function funcOpenWin(Page,Name,Width,Height) {
    var Top =  (screen.height / 2) - (Height / 2);
    var Left =  (screen.width / 2) - (Width / 2);
        window.open(Page,Name,'width=' + Width + ',height=' + Height + ',scrollbars=0,top=' + Top + ',left=' + Left);
}

function ContactForm_onsubmit() {
	if(document.ContactForm.To.value.length == 0) {
		alert("คุณยังไม่ได้เลือกฝ่ายที่ติดต่อ !");
		document.ContactForm.To.focus();
		return false;
	}
	if(document.ContactForm.Subject.value.length == 0) {
		alert("คุณยังไม่ได้กรอกเรื่องที่ติดต่อ !");
		document.ContactForm.Subject.focus();
		return false;
	}
	if(document.ContactForm.Detail.value.length == 0) {
		alert("คุณยังไม่ได้กรอกข้อความ !");
		document.ContactForm.Detail.focus();
		return false;
	}
	if(document.ContactForm.Name.value.length == 0) {
		alert("คุณยังไม่ได้กรอกชื่อ !");
		document.ContactForm.Name.focus();
		return false;
	}
	if(document.ContactForm.Phone.value.length == 0) {
		alert("คุณยังไม่ได้กรอกโทรศัพท์ !");
		document.ContactForm.Phone.focus();
		return false;
	}
	if(document.ContactForm.eMail.value.length == 0) {
		alert("คุณยังไม่ได้กรอกอีเมล์ !");
		document.ContactForm.eMail.focus();
		return false;
	}
	else {
		return true;
	}
}

function ImgOrver(Img1,Img2,Img3) {
	document.getElementById(Img3).style.display = "none";
	document.getElementById(Img2).style.display = "none";
	document.getElementById(Img1).style.display = "";
}


// ######################################### Open Ajax #########################################
        var xmlHttp;
        function createXMLHttpRequest() {
            if(window.ActiveXObject) {
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            else if(window.XMLHttpRequest) {
                xmlHttp = XMLHttpRequest();
            }
        } 
		function DisplayInfoGet(StrUrl,StrById) {
			createXMLHttpRequest();
			xmlHttp.open("get",StrUrl,true);
			xmlHttp.onreadystatechange = function() {
				if(xmlHttp.readyState == 4) {
					if(xmlHttp.status == 200) {
						document.getElementById(StrById).innerHTML = xmlHttp.responseText;
					}
				}
			}
			xmlHttp.send(null);
		}
		
		function getRequestBody(pForm) {
			var nParams = new Array();
			for(var i=0; i<pForm.elements.length; i++) {
				var pParam = encodeURIComponent(pForm.elements[i].name);
				pParam += "=";
				pParam += encodeURIComponent(pForm.elements[i].value);
				nParams.push(pParam);
			}
			return nParams.join("&");
		}
// ######################################### Close Ajax #########################################