

function OpenWindow(URL,winwidth,winheight){

		
		return showModalDialog(URL,window,"dialogWidth:"+ winwidth +"px; dialogHeight:"+ winheight +"px; status:0;help: No;");
}
function replace(strSource,strFrom,strTo){
      var strDest = "";
      var intFromLen = strFrom.length;
      var intPos;

      while((intPos=strSource.indexOf(strFrom))!=-1){
        strDest = strDest + strSource.substring(0,intPos);
        strDest = strDest + strTo;
        strSource = strSource.substring(intPos+intFromLen);
      }
      strDest = strDest + strSource;

      return strDest;
    }
	function delselect(select,n){
		if(select.length>0){
			
			if(n==null)
				var n=select.selectedIndex;
			for(var i = n; i < select.length-1; i ++){
				select.options[i].text=select.options[i+1].text;
				select.options[i].value=select.options[i+1].value;
				
			}
			select.options[0].selected=true;
			select.length--;
		}
	}
	function searchselect(select,str,n){
		for(var i = 0; i < select.length; i ++){
			if(n&&n==2){
				if(select.options[i].text==str)
					return i;
			}else{	
				if(select.options[i].value==str)
					return i;
			}
		}
		return -1;
	}
//document.oncontextmenu="return false"
