// JavaScript Document
<!--
//panick not breakout of frames
if (self != top) top.location.href = document.location.href;





// -->
//---ad for contact us page
/*
_uacct = "UA-199933-1";
urchinTracker();*/

/****************************************

******************************************/
//querystring readerboyo.
var qsParm = new Array();
qsParm['show'] = null;
qs(); 
function qs() {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
   var pos = parms[i].indexOf('=');
   if (pos > 0) {
      var key = parms[i].substring(0,pos);
      var val = parms[i].substring(pos+1);
      qsParm[key] = val;
      }
   }
}
if (qsParm['show']){
	if((qsParm['show'])=='large'){
		//show the dirty wee tabuiTabPageDiv_
		window.onload = initplug;
		document.getElementById("uiTabPageDiv_Main_3").style.display="none";
	}
	
	
}
function initplug(){
	document.getElementById("uiTabPageDiv_Main_2").style.display="block"; 
	document.getElementById("uiTabPageDiv_Main_3").style.display="none";
	document.getElementById("permhid").style.display="none";
	
}
function resetperm(){
	document.getElementById("permhid").style.display="block"; 
	
}
function clearDefault(el) {
if (el.defaultValue==el.value) el.value = ""
}





    function PopupPicker(ctl,w,h)
    {
        var PopupWindow=null;
        //var settings='width='+ w + ',height='+ h + ',location=no,directories=no,' menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,'dependent=no';
        PopupWindow=window.open('calendar.aspx?Ctl=' + ctl,'DatePicker','width='+ w + ',height='+ h + ',location=no,directories=no,');
        PopupWindow.focus();
    }
function settextlayer(text,id) { //v4.01

	if (document.getElementById)
	{
		x = document.getElementById(id);
		x.innerHTML = '';
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all[id];
		x.innerHTML = text;
	}
	else if (document.layers)
	{
		x = document.layers[id];
		text2 = '<P CLASS="testclass">' + text + '</P>';
		x.document.open();
		x.document.write(text2);
		x.document.close();
	}
}
var DHTML = (document.getElementById || document.all || document.layers);

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}
var popNameWindow = null;  // This must be declared as a global
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

	function MM_findObj(n, d) { //v4.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);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
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_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 setTEXT(objName,x) { //v4.01
  document.getElementById("imagedescription").childNodes[0].nodeValue = unescape(imagetext[x]);
// lyrone.innerHTML = unescape(imagetext[x]);
}

function setTEXTN(objName,x) { //v4.01
  document.getElementById("textchange").childNodes[0].nodeValue = unescape(imagetext[x]);
// lyrone.innerHTML = unescape(imagetext[x]);
} 

function doswap(i){
	return (imagenames[i]);
	}
	function hsetTEXT(objname,x) { //v3.0
		imagedescription.innerHTML = unescape(imagetext[x]);
	};

function MakePop(width,height) {
closePop();
var features = 'width=' + width + ',height=' + height;

 popNameWindow = window.open('','HMX',features);
 popNameWindow.focus();
 }

function openNewWindow(URLtoOpen, extrasH, extrasW, windowName, windowFeatures)
{
  var w=extrasW;                        /* popup window width*/
  var h=extrasH;                        /* popup window height*/
  var l=(screen.width-w)/2;         /*this centers horizontally*/
  var t=(screen.height-h)/2; 

  var featurese="left="+l+",top="+t+"";
	closePop();
	popNameWindow=window.open(URLtoOpen, windowName, windowFeatures + "," + featurese);

 popNameWindow.focus();
 }
function closePop() {
    if ( ( popNameWindow != null ) && ( !popNameWindow.closed ))  {
        // window is still open -> close it
        popNameWindow.close();
        popNameWindow = null;
    }
}
function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}

function TabPageClick(oBtn){
         aNameParts = oBtn.id.split('_');
	 iBtnClickedIndex = parseInt( aNameParts[2] );         // the index of the clicked button
	 if( oBtn.className == "navUnselected" ){ return true; // already selected 
	 }

	 oBtn.className = "navUnselected";
	 
	 for(i=1;  i <= 5; i++ ){
	     if(i == iBtnClickedIndex ){  
		    document.getElementById("uiTabPageDiv_"+ aNameParts[1] +"_"+ iBtnClickedIndex).style.display="block"; // show the clicked layer
			continue;
		 }
		 
		 oBtn = document.getElementById("uiTabControl_"+ aNameParts[1] +"_"+ i);
		 if(oBtn){
		    document.getElementById("uiTabPageDiv_"+ aNameParts[1] +"_"+ i).style.display="none";
		    oBtn.className = "navSelected";
		 }else{
		 	break;
		 }
	 }
}


//-->