
function verifyBoxIndex(boxNum){switch(boxNum){case 1:if(document.emailListAddActionForm.email.value==''){document.emailListAddActionForm.email.value='you@yourDomain.com';}
else if(document.emailListAddActionForm.email.value=='you@yourDomain.com'){document.emailListAddActionForm.email.value='';}
break;case 2:if(document.emailListAddActionForm.firstName.value==''){document.emailListAddActionForm.firstName.value='First Name';}
else if(document.emailListAddActionForm.firstName.value=='First Name'){document.emailListAddActionForm.firstName.value='';}
break;case 3:if(document.emailListAddActionForm.lastName.value==''){document.emailListAddActionForm.lastName.value='Last Name';}
else if(document.emailListAddActionForm.lastName.value=='Last Name'){document.emailListAddActionForm.lastName.value='';}
break;case 4:if(document.emailListRemoveActionForm.email.value==''){document.emailListRemoveActionForm.email.value='you@yourDomain.com';}
else if(document.emailListRemoveActionForm.email.value=='you@yourDomain.com'){document.emailListRemoveActionForm.email.value='';}
break;case 5:if(document.emailListAddActionForm.comment.value==''){document.emailListAddActionForm.comment.value='Comments/Questions';}
else if(document.emailListAddActionForm.comment.value=='Comments/Questions'){document.emailListAddActionForm.comment.value='';}
break;case 6:if(document.sendCommentsActionForm.customercomment.value==''){document.sendCommentsActionForm.customercomment.value="Please enter your comments here.";}
else if(document.sendCommentsActionForm.customercomment.value=="Please enter your comments here."){document.sendCommentsActionForm.customercomment.value='';}
break;}}
function swapImageOver(object){var temp=object.src;temp=temp.substring(0,temp.length-5);temp+='2.jpg';object.src=temp;}
function swapImageOut(object){var temp=object.src;temp=temp.substring(0,temp.length-5);temp+='1.jpg';object.src=temp;}
function addItemToCartAction(itemNo1,variant1,comment){if(comment!='null'&&comment!=''){alert(comment);}
document.addItemToCartActionForm.itemNo.value=itemNo1;document.addItemToCartActionForm.variant.value=variant1;document.addItemToCartActionForm.submit();}
function changeItemInCart(changetype,partnum,variant,newqty){document.changeItemInCartActionForm.changeType.value=changetype;document.changeItemInCartActionForm.itemNo.value=partnum;document.changeItemInCartActionForm.variant.value=variant;document.changeItemInCartActionForm.newQty.value=newqty;document.changeItemInCartActionForm.submit();}
function checkShipState(){if(document.submitShippingActionForm.sameAdds.checked){blockoutShipToInLogin(true,"AAAAAA");}
else{blockoutShipToInLogin(false,"FFFFFF");}}
function setChecked(truth){if(truth=='true'){document.submitShippingActionForm.sameAdds.checked=true}
else{document.submitShippingActionForm.sameAdds.checked=false}}
function blockoutShipToInLogin(state,color){form=document.submitShippingActionForm;form.saddress1.style.backgroundColor=color;form.saddress2.style.backgroundColor=color;form.scity.style.backgroundColor=color;form.scounty.style.backgroundColor=color;form.sstate.style.backgroundColor=color;form.szipCode.style.backgroundColor=color;form.saddress1.disabled=state;form.saddress2.disabled=state;form.scity.disabled=state;form.scounty.disabled=state;form.sstate.disabled=state;form.szipCode.disabled=state;}
function checkSaveAddressState(passingObject){if(passingObject.value=="TRUE"){blockoutPasswordInLogin(true,"AAAAAA");}
else{blockoutPasswordInLogin(false,"FFFFFF");}}
function blockoutPasswordInLogin(state,color){form=document.loadUserInfoActionForm;form.password1.style.backgroundColor=color;form.password2.style.backgroundColor=color;form.password1.disabled=state;form.password2.disabled=state;}
function checkType(){if(document.getElementById('checkoutType').getElementsByTagName('input').item(2).checked){document.getElementById('bottom').style.display='block'}
else{document.getElementById('bottom').style.display='none'}}
var myIndex=0;var timer;var urlList=['showCategoryAction.do?category=G_BKITFULL','showProductAction.do?partNum=GT754','showProductAction.do?partNum=GT5-6091 A','showProductAction.do?partNum=GT753','showCategoryAction.do?category=DOMSLIDER','showCategoryAction.do?category=G_GRILLE','showProductAction.do?partNum=GT438'];function setLinks(linkList){urlList=linkList.split('!!!');document.getElementById('topLeftLink').href=urlList[0];document.getElementById('topMiddleLink').href=urlList[0];document.getElementById('topRightLink').href=urlList[0];}
function changeFront(type){myIndex=(myIndex+1)%(urlList.length);var topDiv,bottomDiv;if(document.getElementById('topDiv_1').style.display=='none'){topDiv='topDiv';bottomDiv='topDiv_1';}
else{topDiv='topDiv_1';bottomDiv='topDiv';}
if(type!='hard'){changeIt(bottomDiv,myIndex,urlList[myIndex]);FadeOut(topDiv);FadeIn(bottomDiv);}
else{changeIt(topDiv,myIndex,urlList[myIndex]);}
clearTimeout(timer);timer=setTimeout('changeFront()',8000);}
function changeIt(element,image,url){document.getElementById(element).style.backgroundImage="url('/ImgApp/content/home/top_"+image+".jpg')";document.getElementById('topLeftLink').href=url;document.getElementById('topMiddleLink').href=url;document.getElementById('topRightLink').href=url;}
function changeOrder(topDiv,bottomDiv){document.getElementById(topDiv).style.zIndex='3000';document.getElementById(bottomDiv).style.zIndex='2000';}
function changeFrontPrev(){myIndex=(myIndex-1)%(urlList.length);if(myIndex<0){myIndex=myIndex+(urlList.length);}
var topDiv,bottomDiv;if(document.getElementById('topDiv_1').style.display=='none'){topDiv='topDiv';bottomDiv='topDiv_1';}
else{topDiv='topDiv_1';bottomDiv='topDiv';}
changeIt(topDiv,myIndex,urlList[myIndex]);clearTimeout(timer);timer=setTimeout('changeFront()',8000);}
function stopTimer(){if(!window.attachEvent)return false;clearTimeout(timer);}
function fixLinks(){var getElm=document.getElementsByTagName("a");var s="";for(var i=0;i<getElm.length;i++){if(getElm[i].onclick==null){getElm[i].onclick=function(){stopTimer()};}}}
function startTimer(){timer=setTimeout('changeFront()',12000);var i=1;for(i=0;i<urlList.length;i++){preloader(i);}
if(window.attachEvent){fixLinks();}}
function preloader(image){var preload=document.getElementById('preload');var newImg=document.createElement('img');newImg.setAttribute('src','/ImgApp/content/home/top_'+image+'.jpg');newImg.setAttribute('alt','preload '+image);preload.appendChild(newImg);}
function cvvPopup(){var height=450;var width=290;var x=(640-width)/2;var y=(480-height)/2;if(screen){y=(screen.availHeight-height)/2;x=(screen.availWidth-width)/2;}
window.open('cvv.jsp','_blank','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',scrollbars,resizable');}