/* javascript file for isolite */

preload("nav_contact_off", "/i/nav/contact_off.gif");
preload("nav_contact_on", "/i/nav/contact_on.gif");
preload("nav_corp_off", "/i/nav/corp_off.gif");
preload("nav_corp_on", "/i/nav/corp_on.gif");
preload("nav_events_off", "/i/nav/events_off.gif");
preload("nav_events_on", "/i/nav/events_on.gif");
preload("nav_order_off", "/i/nav/order_off.gif");
preload("nav_order_on", "/i/nav/order_on.gif");
preload("nav_support_off", "/i/nav/support_off.gif");
preload("nav_support_on", "/i/nav/support_on.gif");
preload("nav_inst_off", "/i/nav/inst_off.gif");
preload("nav_inst_on", "/i/nav/inst_on.gif");
preload("nav_system_off", "/i/nav/system_off.gif");
preload("nav_system_on", "/i/nav/system_on.gif");
preload("nav_testimonials_off", "/i/nav/testimonials_off.gif");
preload("nav_testimonials_on", "/i/nav/testimonials_on.gif");
preload("nav_video_off", "/i/nav/video_off.gif");
preload("nav_video_on", "/i/nav/video_on.gif");
preload("nav_home_off", "/i/nav/home_off.gif");
preload("nav_home_on", "/i/nav/home_on.gif");
preload("nav_jobs_off", "/i/nav/jobs_off.gif");
preload("nav_jobs_on", "/i/nav/jobs_on.gif");
function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}

function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
	  document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

function printHtmlItem(oForm,sHtmlID) {
	pWindow = window.open('','printWindow');
	dpt = document.getElementById(sHtmlID);
	oForm.printHTML.value = dpt.innerHTML;
	oForm.submit();
}

function videoWindow(vname) {
	vwindow = window.open('/player.asp?vname='+vname+'&mov='+arguments.length,'videowindow','width=400,height=515,resizable=yes,scrollbars=no');
}

function flashVideoWindow(vname,title,newheight) {
	var height = 395;
	if (newheight) {
		height = newheight + 15;
	}
	fvwindow = window.open('/flashplayer.asp?id='+vname+'&title=' + encodeURIComponent(title),'videowindow','width=540,height='+height+',resizable=yes,scrollbars=no');
}

function imgWindow(imgname) {
	iwindow = window.open('/i/mouthpiece/'+imgname+'.jpg','imgwindow','width=620,height=440,resizable=yes,scrollbars=no');
}

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
  return null
}

function changeFlash(frame){
	var oFlash = getFlashMovieObject("fQuotes");
	if( oFlash != null ){
		oFlash.GotoFrame(frame);
		oFlash.Play();
	}
}

function openMspCalculator() {
	mspWindow = window.open('/msp/calculator.asp','mspwindow','width=620,height=240,resizable=yes,scrollbars=no');
}

/* functions for seeds */
function checkData(obj) {
	a(obj);
	return b();
}

function b(obj) {
	return true;
}

function a(obj) {
	obj.seed.value = c();
}

function c() {
	return "documentaryfryinginabilityflour";
}
/* end */