// JavaScript Document
var javascript_version=1.1;

function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

// 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 popSameWindow(URL, width, height) {
  window.open(URL, 'sameWindow', 'toolbar=0,scrollbars=no,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 pop_resize() {
	var pic = document.images['pic'];
	window.resizeTo( pic.width + 20, pic.height + 70 );
//	window.resizeTo( pic.width + 8, pic.height + 115 );
}

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 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;
}

