function openWinCenter(url,windowname,width,height) {
	var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no";
	if (width) {
		if (window.screen.width > width){
			features+=", left="+(window.screen.width-width)/2;
		}else{
			width=window.screen.width;
		}
		features+=", width="+width;
	}
	if (height) {
		if(window.screen.height > height){
			features+=", top="+(window.screen.height-height)/2;
		}else{
			height=window.screen.height;
		}
		features+=", height="+height;
	}
	var win = window.open(url,windowname,features);
	win.focus();
}



function doInputInitOnFocus(object,initVal){
	if (object.value == initVal){
		object.value = "";
	}
}

function doInputInitOnBlur(object,initVal){
	if (object.value == ""){
		object.value = initVal;
	}
}

function doInputResetIfDefault(objName,initVal){
	if ($(objName).value == initVal){
		$(objName).value = "";
	}
}

function getRadioValue(p){
    if(p.length){
        for(i=0;i<p.length;i++){
            if(p[i].checked) return p[i].value;
        }
    }else{
        return p.value;
    }
}
