/* General */
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 1));
if (isEmail){
return (true);
}else{
alert("電郵地址不正確");
theForm.email.focus();
return (false);
}
}
function CheckAll(formname) {
temp = eval("document." + formname);
for (var i = 0;i < temp.elements.length; i++) {
var e = temp.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox'))
e.checked = temp.allbox.checked;
}
}
function ShowSpan(objName)
{
var obj = document.getElementById(objName);
var objarr = getElementsByName_iefix("div","bbs");
for (var i =0;i < objarr.length ;i++ )
{
objarr[i].style.display = "none";
}
obj.style.display = "";
}
function getElementsByName_iefix(tag, name) {
var elem = document.getElementsByTagName(tag);
var arr = new Array();
for(i = 0,iarr = 0; i < elem.length; i++) {
att = elem[i].getAttribute("name");
if(att == name) {
arr[iarr] = elem[i];
iarr++;
}
}
return arr;
}
function QuoteFormValidator(theForm) {
if (theForm.client.value=="") {
alert("Please enter the Name!");
theForm.client.focus();
return (false);
}
if (theForm.email.value == ""){
alert("Please enter the Email!");
theForm.email.focus();
return (false);
}
else if (isEmail(theForm) == false) {
return (false);
}
if (theForm.tel.value=="") {
alert("Please enter the Tel!");
theForm.tel.focus();
return (false);
}
}
function showAndHide(obj,types){
var Layer=window.document.getElementById(obj);
switch(types){
case "show":
Layer.style.display="block";
break;
case "hide":
Layer.style.display="none";
}
}