// JavaScript Document
var javascript_version=1.1;

// Function which creates a popup window for each call 
/*function popNewWindow(URL, width, height) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0,width="+width+",height="+height"+,left = 200,top = 50');");
}
*/

function MM_openBrWindow(theURL,winName,features) {
  /* window.open(theURL,winName,features); */
	window.open(theURL,winName, 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0,width=685,height=600,left=20,top=20');
}

function popSameWindow(URL, width, height) {
  window.open(URL, 'sameWindow', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height+',left=50,top=50');
}


function changeCSSClass(id, newClass){
  identity=document.getElementById(id);
	identity.className=newClass;
}

function setHot(id){
	changeCSSClass(id, 'hot');
}

function openPicWindow(pic) {
  pic = '../../' + pic
	newWindow = window.open('webexpo/tools/picWindow.htm?pic=' + pic , 'photowindow', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=100,height=50,left = 80,top = 50');
}

function openCheerPicWindow(pic) {
	newWindow = window.open('webexpo/tools/cheerpicWindow.htm?pic=' + pic , 'photowindow', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=100,height=50,left = 80,top = 50');
}

function pop_resize() {
	var pic = document.images['pic'];
	window.resizeTo( pic.width + 27, pic.height + 77 );
//	window.resizeTo( pic.width + 8, pic.height + 115 );
}

function getURLparams() {
  // split the URL into URI & querystring
  var sURL = new String(document.location.href);
  var aHref = sURL.split("?");
  
  // this leaves the URI in aHref[0] and the querystring in aHref[1]
  
  // get an array of argument/value pairs
  var sQ = new String(aHref[1]);
  var aArgPairs = sQ.split("&");
  
  // this puts each "arg=val" pair into each array element
  
  // parse arg pairs
  for (var iArg=0; iArg < aArgPairs.length; iArg++)
  {
           var sArgPair = new String(aArgPairs[iArg]);
           var aArg = sArgPair.split("=");
  
           // this puts the parameter in aArg[0] and the value in aArg[1]
  }
}

function getURLparam(urlParameter) {
  // split the URL into URI & querystring
  var sURL = new String(document.location.href);
  var aHref = sURL.split("?");
	var returnValue = 'not defined'
	  
  // this leaves the URI in aHref[0] and the querystring in aHref[1]
  
  // get an array of argument/value pairs
  var sQ = new String(aHref[1]);
  var aArgPairs = sQ.split("&");
  
  // this puts each "arg=val" pair into each array element
  
  // parse arg pairs
  for (var iArg=0; iArg < aArgPairs.length; iArg++)
  {
           var sArgPair = new String(aArgPairs[iArg]);
           var aArg = sArgPair.split("=");
  
           // this puts the parameter in aArg[0] and the value in aArg[1]
					 if (aArg[0] == urlParameter) returnValue =  aArg[1]

  }

	return returnValue;
}


function writeActiveContent(path,width,height) {

   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="'+path+'" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+path+'" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="salign" value="t" /><param name="bgcolor" value="#ffffff" /><embed src="'+ path +'" quality="high" scale="noscale" salign="t" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+path+'" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
}


