﻿
function highlight(elem, color) { 
elem.style.background=color;
elem.style.cursor = 'hand';
} 
function unHighlight(elem) { 
//elem.className = 'menuButt';
elem.style.background='';
} 


function WatermarkFocus(txtElem, strWatermark) {

if (txtElem.value == strWatermark) txtElem.value = ''; 

}


function WatermarkBlur(txtElem, strWatermark) {

if (txtElem.value == '') txtElem.value = strWatermark;}


// par of the code that hides forms when submenus show up
var isIE=document.all?true:false;
var layers = isIE?document.all.tags("DIV"):null;
function changeall(v)
{
 if(!isIE)return; /* only do things for IE */
 for(var i=0;i<layers.length;i++)
	  justOne(i,v);
}

function hideAll(except){
	var layers = new String("<%=layers%>");
	var layersArr;
	layersArr = layers.split(",");
	for (var i in layersArr) 
	{	if (layersArr[i] != except) {
	    if(document.layers)	   //NN4+
	    {
		document.layers[layersArr[i]].visibility = "hide";
	    }
	    else if(document.getElementById)	  //gecko(NN6) + IE 5+
	    {
	      var obj = document.getElementById(layersArr[i]);
	      obj.style.visibility = "hidden";
    	}
	    else if(document.all)	// IE 4
	    {
	    document.all[layersArr[i]].style.visibility = "hidden";
	    }
		}
	};
	}
	
	
function GetHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return myHeight
}
function GetWidth() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return myWidth
}
