/*This over rides the google yellow fields*/
<!--
  if(window.attachEvent)
    window.attachEvent("onload",setListeners);
 
  function setListeners(){
    inputList = document.getElementsByTagName("INPUT");
    for(i=0;i<inputList.length;i++){
      inputList[i].attachEvent("onpropertychange",restoreStyles);
      inputList[i].style.backgroundColor = "";
    }
    selectList = document.getElementsByTagName("SELECT");
    for(i=0;i<selectList.length;i++){
      selectList[i].attachEvent("onpropertychange",restoreStyles);
      selectList[i].style.backgroundColor = "";
    }
  }
	

function setPointer(theRow, thePointerColor)
{
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }

    return true;
}
  function restoreStyles(){
    if(event.srcElement.style.backgroundColor != "")
      event.srcElement.style.backgroundColor = "";
}//-->
 

	  //Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
	  //For full source code, 100's more DHTML scripts, and TOS,
	  //visit http://www.dynamicdrive.com

	  var highlightcolor="#ffffff"

	  var ns6=document.getElementById&&!document.all
	  var previous=''
	  var eventobj
	  //Regular expression to highlight only form elements
	  var intended=/INPUT|TEXTAREA|SELECT|OPTION/

	  //Function to check whether element clicked is form element
	  function checkel(which){
	  if (which.style&&intended.test(which.tagName)){
	  if (ns6&&eventobj.nodeType==3)
	  eventobj=eventobj.parentNode.parentNode
	  return true
	  }
	  else
	  return false
	  }
	  //Function to highlight form element
	  function highlight(e){
	  eventobj=ns6? e.target : event.srcElement
	  if (previous!='')
		{
		if (checkel(previous))
			previous.style.backgroundColor=''
			previous=eventobj
		if (checkel(eventobj))
			eventobj.style.backgroundColor=highlightcolor
		}
		else{
			if (checkel(eventobj))
				eventobj.style.backgroundColor=highlightcolor
				previous=eventobj
			}
	  }
		//User Defined functions
		
//To set Maxlength for a Text Area
function onKey(x, pMaxLength) {
		if (x.value != '') {				
			if (x.value.length > pMaxLength) {		
			      x.value = x.value.substring(0, pMaxLength);
			      x.blur();
			} 
		} 
	}	


//Validation Rules
   function notEmpty(str){
      if(strip(" \n\r\t",str).length ==0)
         return false;
      else
         return true;
   }
   function validateInteger(str){
      str = strip(' \n\r\t',str);
      //remove leading zeros, if any
      while(str.length > 1 && str.substring(0,1) == '0'){
         str = str.substring(1,str.length);
      }
      var val = parseInt(str);
      if(isNaN(val))
         return false;
      else
         return true;
   }
   
   function validateFloat(str){
      str = strip(' \n\r\t',str);
      //remove leading zeros, if any
      while(str.length > 1 && str.substring(0,1) == '0'){
         str = str.substring(1,str.length);
      }
      var val = parseFloat(str);
      if(isNaN(val))
         return false;
      else
         return true;
   }
   function Browserdetails(){
	Browserdetails="BROWSER="+navigator.appName +"BROWSERVERSION="+navigator.appVersion+"REFERRER="+document.referrer
	return Browserdetails;
   }
   
   function validateDate(str){
      var dateVar = new Date(str);
      if(isNaN(dateVar.valueOf()) || 
         (dateVar.valueOf() ==0))
         return false;
      else
         return true;
   }
  function selectText(x){
	x.select();
  }
  



//This script will fix the print screen problem on IE 4

var da = (document.all) ? 1 : 0;
var pr = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1);

function printPage() {
  if (pr) // NS4, IE5
    window.print()
  else if (da && !mac) // IE4 (Windows)
    vbPrintPage()
  else // other browsers
    alert("Sorry, your browser doesn't support this feature.");
  return false;
}

if (da && !pr && !mac) with (document) {
  writeln('<OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
  writeln('<' + 'SCRIPT LANGUAGE="VBScript">');
  writeln('Sub window_onunload');
  writeln('  On Error Resume Next');
  writeln('  Set WB = nothing');
  writeln('End Sub');
  writeln('Sub vbPrintPage');
  writeln('  OLECMDID_PRINT = 6');
  writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 2');
  writeln('  OLECMDEXECOPT_PROMPTUSER = 1');
  writeln('  On Error Resume Next');
  writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER');
  writeln('End Sub');
  writeln('<' + '/SCRIPT>');
}

function updateParentWindow(aLoc) {
   top.opener.parent.document.location.href = aLoc;
	 
  window.close();
}
function updateParentIFrame(aLocation,aFrame,divID) {
	
	docLoc = top.opener.parent.document.getElementById(divID);
	//if{
		//top.opener.parent.document.close();
		//window.close();
		//break;
	//}
//	else
	if ((docLoc.style.display == "none" || docLoc.style.display == "")) {
		docLoc.style.display = "block";
	} 

	else {
		docLoc.style.display = "block"; 
	}
  top.opener.parent.document.frames(aFrame).location.href = aLocation;
  window.close();
}

function NewWindow(Location)
	{
	  	window.open(Location,'Plain','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=630,height=580');
	}
	
function HelpWindow(filename)
{
  window.open(filename,'Help','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=50,left=70,width=740,height=580');
}
function SaveWindow(filename)
{
  window.open(filename,'Help','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=50,left=70,width=640,height=520');
}
function AppWindow(filename)
		{
			window.open(filename,'Plain','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=796,height=620');
		}
		function Window1000(filename)
{
  window.open(filename,'1000','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=1000,height=720');
}
function Window987(filename)
{
  window.open(filename,'987','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=987,height=720');
}
function Window950(filename)
{
  window.open(filename,'950','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=950,height=720');
}
function Window900(filename)
{
  window.open(filename,'900','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=900,height=720');
}
function Window850(filename)
{
  window.open(filename,'850','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=850,height=550');
}
function Window800(filename)
{
  window.open(filename,'800','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=800,height=550');
}
function Window750(filename)
{
  window.open(filename,'750','menubar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=740,height=640');
}
function Window700(filename)
{
  window.open(filename,'700','menubar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=700,height=540');
}
function Window640(filename)
{
window.open(filename,'640','menubar=no,toolbar=no,location=no,menus=no,scrollbars,resizable=1,status=yes,top=5,width=640,height=560');
}
function Window500(filename)
{
  window.open(filename,'sec','menubar=no,location=no,menus=no,scrollbars=yes,resizable=1,status=yes,top=5,width=500,height=450');
}
function Window450(filename)
{
  window.open(filename,'450','menubar=no,location=no,menus=no,scrollbars=yes,resizable=1,status=yes,top=5,width=450,height=400');
}
		
	
	
  isNS4 = (document.layers) ? true : false;
  isIE4 = (document.all && !document.getElementById) ? true : false;
  isIE5 = (document.all && document.getElementById) ? true : false;
  isNS6 = (!document.all && document.getElementById) ? true : false;
 


  function switchDiv(strDivName,bolVisible){
	//alert(strDivName + "!!!!!" + bolVisible);
  //identify the element based on browser type
  if (isNS4) {
    objElement = document.layers[strDivName];
  } else if (isIE4) {
    objElement = document.all[strDivName];
  } else if (isIE5 || isNS6) {
    objElement = document.getElementById(strDivName);
  }

  if (isNS4) {
    if (!bolVisible) {
      //objElement.style.visibility = "hidden";
      objElement.visibility ="hidden"
      objElement.style.display = "none";
    } else {
      //objElement.style.visibility = "visible";
      objElement.visibility ="visible";
      objElement.style.display = "";
    }
  } else {
    if (!bolVisible) {
      objElement.style.visibility = "hidden";
      objElement.style.display = "none";
      //document.layers[strDivName].visibility ="hidden"
    } else {
      objElement.style.visibility = "visible";
      objElement.style.display = "";
      //document.layers[strDivName].visibility ="visible"
    }
  }
}



function closeWindow() {

window.open('','_parent','');

window.close();

}


		function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}
			
			




