function open_win (wurl, wname, wheight, wwidth, wscroll, resizable) {
	var timedate = new Date();
	var showdate = timedate.toLocaleString();
	
	addwin = window.open(wurl,wname,'height='+ wheight+ ',width=' + wwidth +',directories=0,hotkeys=0,location=0,menubar=0,resizable=' + resizable + ',scrollbars=' +wscroll+ ',toolbar=0');
	addwin.focus();
	return true;
}
	
function open_doc(wurl,wname,wheight,wwidth,wscroll){
	var timedate = new Date();
	var showdate = timedate.toLocaleString();
	
	addwin = window.open(wurl,wname,'height='+wheight+',width='+wwidth+',directories=0,hotkeys=0,location=0,menubar=1,resizable=1,scrollbars=1,toolbar=0');
	addwin.focus();
	return true;
}


function maskKeyPress(objEvent){
	var iKeyCode;  	
	iKeyCode = objEvent.keyCode;	
	//alert(iKeyCode);
	if((iKeyCode>=48 && iKeyCode<=57) || iKeyCode==13 || iKeyCode==46) return true;
  		return false;
}

function maskTextAreaKeyPress(val){	
	if(val.length<=750) return true;
  		return false;
}
<!--
  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 restoreStyles(){
    if(event.srcElement.style.backgroundColor != "")
      event.srcElement.style.backgroundColor = "";
  }

	function resetValue(obj1,obj2) {
		obj1.value = '';
		obj2.value = '';
	}
	
function hideSelects(action) {
	//possible values for action are 'hidden' and 'visible'
	if (action!='visible')
	{	
		action='hidden';
	}
	if (navigator.appName.indexOf("MSIE")) 
	{
		for (var S = 0; S < document.forms.length; S++)
		{
			for (var R = 0; R < document.forms[S].length; R++) 
			{
					if (document.forms[S].elements[R].options) 
					{
						document.forms[S].elements[R].style.visibility = action;
					}
			}
		} 
	}
}



function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

