function golargeimage(oog,eeg,ig,imagealt)
{
var winpops=window.open("goimage.php?imagealt=" + imagealt + "&image=" + oog + "&width=" + eeg + "&height=" +ig,"","resizable=1,width=100,height=100")

return false;
}

function MM_openBrWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
}



//submenu
function menushow(id)
{
document.getElementById(id).style.display = "block";
}
function menuhide(id)
{
document.getElementById(id).style.display = "none";
}

function MM_openBrWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
}


/************ CLOCK **************/
    

	function displayclock() { 
	  var entime = new Date();
	  
    var timezoneoffset = parseInt(document.getElementById('timeoffset').innerHTML);

    var hours = entime.getUTCHours() + timezoneoffset;
    var min = entime.getUTCMinutes();
    var sec = entime.getUTCSeconds();
    var milsec = entime.getUTCMilliseconds();
    

    var Time = ((hours < 10) ? "0" : "") + hours; 
    Time += ((min < 10) ? ":0" : ":") + min; 
    Time += ((sec < 10) ? ":0" : ":") + sec;
    milsec = milsec+'000';
    Time += ":"+milsec.substring(0, 2);
    
    
   
    document.getElementById('clockdiv').innerHTML  = "TCR " + Time + ""; 
    setTimeout("displayclock()",100); 
  } 

  









function check() { 
	var duration = document.quote_form.duration.value;
	var voiceover = document.quote_form.voiceover.value;
	var maetrack = document.quote_form.maetrack.value;
	var da88tape = document.quote_form.da88tape.value;
	
	var a = document.quote_form.a.value;
	var b = document.quote_form.b.value;
	var c = document.quote_form.c.value;
	var d = document.quote_form.d.value;

	if((duration=="") || (isNaN(parseInt(duration)))  ) { 
		alert("Please enter the number of minutes of your programme's duration .");
		document.quote_form.duration.value="";
		document.quote_form.duration.value.focus();
		return false; 
	} 
	else {
		show(); 
	}
}
	
function show() {
  var duration = parseInt(document.quote_form.duration.value);
  
  var st_voiceover = parseInt(document.quote_form.voiceover.value);
  var st_maetrack = parseInt(document.quote_form.maetrack.value);
  var st_da88tape = parseInt(document.quote_form.da88tape.value);
  
  var a = parseFloat(document.quote_form.a.value);
  var b = parseFloat(document.quote_form.b.value);
  var c = parseFloat(document.quote_form.c.value);
  var d = parseFloat(document.quote_form.d.value);
  
  if (st_voiceover){
    st_voiceover = 1;
  }
  else st_voiceover = 0;
  
  if (st_maetrack){
    st_maetrack = 1;
  }
  else st_maetrack = 0;
  
  if (st_da88tape){
    st_da88tape = 1;
  }
  else st_da88tape = 0;
  
  
  var output = 0;
  
  
  var output = duration*a + st_voiceover*duration*(b-a) + st_maetrack*duration*(c-a) + st_da88tape*duration*(d-a);
  
  document.getElementById("final").innerHTML = output + ' pounds';
  
}
