closetime = 0;
  function resetHgt()
  {
	 document.getElementById('sidemenu').style.height=document.getElementById('contentarea').clientHeight+70;
	 document.getElementById('footer').style.top=document.getElementById('sidemenu').clientHeight+110;
  }
  function resetHgt2()
  {
	 document.getElementById('sidebar').style.height=document.getElementById('contentarea').clientHeight+70;
  }
  function popWin()
  {
	var email;
	var strName;
	email = document.forms['form1'].email.value;
	strName = document.forms['form1'].strName.value;
	window.open('newsjoin.asp?email=' + email + '&strname=' + strName,'newsjoin' + parseInt(Math.random() * 1000000),'directories=0,toolbar=0,menubar=0,personalbar=0,location=0,scrollbars=1,status=0,resizable=0,height=150,width=150,screenX=20,screenY=20,left=20,top=20');
  }
  function popNews(popVar)
  {
	  if (popVar == 'True'){
	  	 url1 = "newsjoin.asp";
      	 width1 = 550;  // width of window in pixels
      	 height1 = 420; // height of window in pixels
	  	 winname1 = "newsletter";
      	 delaya = 20;    // time in seconds before popup opens
	  	 timer = setTimeout("Start(url1, width1, winname1, height1)", delaya*1000);
	  }
  }
  function popFaxWin(url)
  {
	window.open(url,'faxorder' + parseInt(Math.random() * 1000000),'directories=0,toolbar=0,menubar=0,personalbar=0,location=0,scrollbars=1,status=0,resizable=0,height=400,width=550,screenX=20,screenY=20,left=20,top=20');
  }
  function popInfoWin(url)
  {
	window.open('copy.asp?id='+url,'faxorder' + parseInt(Math.random() * 1000000),'directories=0,toolbar=0,menubar=0,personalbar=0,location=0,scrollbars=1,status=0,resizable=0,height=500,width=450,screenX=20,screenY=20,left=20,top=20');
  }
  function popSurvey(popVar) {
	if (popVar == 'True'){
	  url = "survey.asp";
      width = 550;  // width of window in pixels
      height = 550; // height of window in pixels
      delay = 22;    // time in seconds before popup opens
	  winname = "survey";
      timer = setTimeout("Start(url, width, winname, height)", delay*1000);
	}
  }
  
  function checkDom() {
      winLoc = new String(window.opener.location);
	  rExp = /panic/;
	  results = winLoc.search(rExp);
	  try {
	  	  if (results != 0)
	  	  	 throw "error 1"
	  	  }
	  catch (gone) {
	  		if (gone == "error 1")
	  		self.close();
	  }
  }
  function Start(URL, WIDTH, WINNAME, HEIGHT) {
  	   windowprops = "directories=0,toolbar=0,menubar=0,personalbar=0,location=0,scrollbars=1,status=0,resizable=1,screenX=30,screenY=30,left=30,top=30,height=" + HEIGHT + ",width=" + WIDTH;
  	   preview = window.open(URL, WINNAME, windowprops);
  	   preview.blur();preview.location=URL;preview.blur();
  	   if (closetime) setTimeout("preview.close();", closetime*1000);
  }
  
  function resizeIframe() {
	  newHeight = Number(document.getElementById('iFrameContents').clientHeight);
	  if (newHeight != 0) {
	  	 window.resizeTo(550,newHeight);
		 //window.scrollbars.visible=false;
	  }
  }
  
  function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		preloadFlag = true;
	}
}
