<!--
rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
  rnd.seed = (rnd.seed*9301+49297) % 233280;
  return rnd.seed/(233280.0);
}

function rand(number) {
  return Math.ceil(rnd()*number);
}

var newwindow;
function PopUp(url,w,h,sb,rs,st,tb,mb,ti,lc)
{

 lft = (screen.availWidth -w)/2;
 t = (screen.availHeight -h)/2;
 p = "scrollbars=" + sb + ",resizable=" + rs + ",status=" + st + ",toolbar=" + tb + ",menubar=" + mb + ",titlebar=" + ti + ",location=" + lc + ",top=" + t + ",left=" +lft + ",width=" + w + ",height=" + h;
 winloc = window.location.toString();
 if (navigator.appName.toString().indexOf("Microsoft",0) == -1 ) {  // If not MSIE...
 	winloc = winloc.slice(winloc.indexOf("http:", 8)); // ... take off the redundant front end.
 } else {  // If it IS MSIE...
 	// do nothing.
 }
 if (navigator.appName.toString().indexOf("Microsoft",0) != null) {
 	winloc = winloc.slice(0,window.location.toString().indexOf("http:", 8) + 1);
 }
 
 newwindow=window.open(winloc + url, rand(101)-1, p);
 if (window.focus) {newwindow.focus()}
}



//***********Cookie Functions**************
function setCookie (name, value, expires) {
if (!expires) expires = new Date();
  document.cookie = name + "=" + escape (value) + "; expires=" + expires.toGMTString() +  "; path=/";
}

function getCookie (name) {
  var dcookie = document.cookie; 
  var cname = name + "=";
  var clen = dcookie.length;
  var cbegin = 0;
    while (cbegin < clen) {
    var vbegin = cbegin + cname.length;
      if (dcookie.substring(cbegin, vbegin) == cname) { 
      var vend = dcookie.indexOf (";", vbegin);
          if (vend == -1) vend = clen;
      return unescape(dcookie.substring(vbegin, vend));
      }
    cbegin = dcookie.indexOf(" ", cbegin) + 1;
      if (cbegin == 0) break;
    }
  return null;
}

function delCookie(name,path,domain) {
    if (Get_Cookie(name)) document.cookie = name + "=" +
        ( (path) ? ";path=" + path : "") +
        ( (domain) ? ";domain=" + domain : "") +
        ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

function isCookieEnabled() {
   if (document.all) return navigator.cookieEnabled;
   Set_Cookie('testcookie',today.getTime());
   var tc = Get_Cookie('testcookie');
   Delete_Cookie('testcookie');
   return (tc == today.getTime());
}

function getQS(strDelim){
strDelim = strDelim + "=";
qs = location.search;
beginPos = qs.indexOf(strDelim);
if (beginPos < 0) return "";
beginPos = beginPos  + strDelim.length;
endPos = qs.indexOf("&",beginPos + 1);
if (endPos > beginPos) {
   parmval = qs.slice(beginPos,endPos);}
else {
   parmval = qs.slice(beginPos);}
return parmval;
}

//********Image Swap & Show/Hide Layers***********

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}

function MM_showHideLayers() { //v3.0A Modified by Al Sparber and Massimo Foti for NN6 Compatibility
  var i,p,v,obj,args=MM_showHideLayers.arguments;if(document.getElementById){
   for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];
   v=(v=='show')?'visible':(v='hide')?'hidden':v;
   if(obj)obj.style.visibility=v;}} else{
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }}
}
//-->
