function win_open( url, w, h) {
	window.open( url,'mywindow','width='+w+',height='+h+',toolbar=no, location=no,directories=no,status=no,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes');
}

	function clearOption(selectId){
		var ie = (document.all && !window.opera);
		var safari = navigator.userAgent.indexOf("Safari") != -1;
		if ( safari) {
			//*
			opt = document.getElementById(selectId);
			var cnt = opt.options.length;
			for( i=0; i<cnt; i++) {
				// opt[0]=null;
				opt.remove( 0);
			}
			//*/
		}
		else {
			document.getElementById(selectId).options.length=0;
		}
	}    
	
	function addOption(selectId, txt, val){
		var safari = navigator.userAgent.indexOf("Safari") != -1;
		if ( safari) {
			var objOption = document.createElement('option');
			objOption.value = val;
			objOption.text = txt;
			document.getElementById(selectId).add(objOption);
		}
		else {
			//var objOption = new Option(txt, val);
			var objOption = document.createElement('option');
			objOption.value = val;
			objOption.text = txt;
			document.getElementById(selectId).options.add(objOption);
		}
        
	}

	function setSelected(selectId, val){
        opt = document.getElementById(selectId).options;
		for( i=0; i<opt.length; i++) {
			if (val == opt[i].value) {
				opt.selectedIndex = i;
			}
		}
	}
	
	function addAssign(id,modify,data){
		elem=document.getElementById(id);
		switch(modify){
		case 'innerHTML': elem.innerHTML=data;break;
		case 'value': elem.value=data;break;
		case 'disabled': elem.disabled=data;break;
		default: break;
		}
	}