function openWindow(url,iWidth,iHeight) {
	var iLeft = (screen.availWidth - iWidth);
	var iTop = (screen.availHeight - iHeight);
	
	window.open(url, "_blank", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,width=" + iWidth + ",height=" + iHeight + ",top= " + iTop + ",left=" + iLeft + "");

	/*window.location.href = url;*/

}

function openDialog(url, iWidth, iHeigth){
	var sURL = url;
	var vArguments = "";
	var sFeatures = "dialogHeight: " + iHeigth + "px; dialogWidth: " + iWidth + "px; edge: Raised; center: Yes; help: No; resizable: No; status: No;";
	
	window.showModalDialog(url, vArguments, sFeatures);
}

function PrintForm() {
	alert ("´òÓ¡ÏµÍ³!");
}

function CheckInput(str, iType) {
	var re;
	switch (iType) {
		case 1:
			re = /[^\d]/g;
			break;
		case 2:
			re = /[^\w+$]/g;
			break;
		/*case 3:
			re = /^(d{2}|d{4})-((0([1-9]{1}))|(1[1|2]))-(([0-2]([1-9]{1}))|(3[0|1]))$/g;
			//    (\d{4}|\d{2})((0([1-9]{1}))|(1([1|2]{1})))((([0-2]{1})([1-9]{1}))|(3([0|1]{1})))$
			break;*/
	 }
	
	if(re.test(str))
		return true;
	else
		return false;
}
