//==================================
   function getCookie(name) {
      var prefix = name + "="
      var cookieStartIndex = document.cookie.indexOf(prefix)
      if (cookieStartIndex == -1) return null
      var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
      if (cookieEndIndex == -1)
	cookieEndIndex = document.cookie.length
      return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
   }
//===================================
  function openWin(url,w,h){open(url,"","width="+w+",height="+h+",directories=1,scrollbars=1,status=1,resizable=1");}
   function checkData(data, msg, reqLen){
	if((data.value == "") || (data.value.length < reqLen)) {
		alert('Please enter '+msg+' with atleast '+reqLen+' characters.');
		data.focus();
		return false;
	}
	return true;
   }
    function checkNum(theField, theMsg, minimumValue){
  	if(isNaN(theField.value)){
		alert("Please enter only numbers in "+theMsg+" .");
		theField.focus();
  		return false;
	}
	if(parseFloat(theField.value) <= minimumValue){
		alert("Please enter a value greater than "+minimumValue+" in "+theMsg+" .");
		theField.focus();
  		return false;
	}
    	return true;
    }
	function intOnly(i) {
		if(i.value.length>0) {
			i.value = i.value.replace(/[^\d]+/g, ''); 
		}
	}
	
	
	
	
	function HandleOnClose(filename) {
   if ((event.clientY < 0)) {
	
	   
	   myWindow = window.open(filename, "tinyWindow", 'resizable width=550,height=390, scrollbars' )
	   myWindow.document.bgColor=""
	   myWindow.document.close() 
   }
}


function HandleOnSubmit(file_name) {

	   myWindow = window.open(file_name, "tinyWindow", 'resizable width=467,height=220,scrollbars')
	   myWindow.document.close() 

}


function onFocusBlank(element,defaultVal){
	if(element.value==defaultVal){
		element.value="";
	}
}

function onBlurDefault(element,defaultVal){
	if(element.value==""){
		element.value = defaultVal;
	}
}

	function Decorate(strPlan)
{
       if (document.getElementById('plantype2') != undefined)  
       {
		   document.getElementById('plantype2').innerHTML = strPlan;
		   document.getElementById('plantype2').style.background='Beige';  
       }

       return true;
}
function Decorate1(strPlan)
{
       if (document.getElementById('plantype2') != undefined) 
       {
		   document.getElementById('plantype2').innerHTML = strPlan;
		   document.getElementById('plantype2').style.background='';               
       }

       return true;
}