function toggle_bgcolor(obj,mode,site_id){ bgClr = new Array(); bgClr['pink'] = new Array('#D60D8C','#f9cce0'); bgClr['blue'] = new Array('#002D56','#B9E1F7'); fColor = new Array(); fColor[0] = '#FFFFFF'; fColor[1] = '#000000'; obj.style.backgroundColor = bgClr[site_id][mode]; obj.firstChild.style.color = fColor[mode]; } function changeaction(){ var formObj = document.getElementById('confirm_form'); url="http://"; url+=location.hostname; url+=location.pathname; url+="?action=order"; formObj.action=url; formObj.submit(); } function showHideBilling(num){ Obj = document.getElementById('BillingInfo'); if(num == 1){ Obj.style.visibility = 'hidden'; Obj.style.display = 'none'; document.getElementById('billemail').value = ""; }else{ Obj.style.visibility = 'visible'; Obj.style.display = 'block'; if(document.getElementById('billemail').value == '' || document.getElementById('billemail').value == ' '){ document.getElementById('billemail').value = document.getElementById('shipemail').value; } } } function showHideShipDiv(num){ Obj = document.getElementById('shipInfoDiv'); if(num == 1){ Obj.style.visibility = 'hidden'; Obj.style.display = 'none'; }else{ Obj.style.visibility = 'visible'; Obj.style.display = 'block'; } } function validate_user(){ var Obj1 = document.getElementById('username'); var Obj2 = document.getElementById('password'); if(Obj1.value == "" || Obj2.value == ""){ return(0); }else{ return(1); } } /*cursor functions*/ function startMouse(){ var bodyObj = document.getElementsByTagName('body')[0]; // bodyObj.onmouseout = function(e){ // stopMouse(e); // } bodyObj.onfocus = function(e){ moveMouse(e); } bodyObj.onmousemove = function(e){ moveMouse(e); } } function stopMouse(){ var curObj = document.getElementById('cursorCont'); curObj.style.visibility = 'hidden'; curObj.style.display = 'none'; } function moveMouse(event){ clearTimeout(curT); var e = (window.event) ? window.event : event; var x = e.clientX + document.documentElement.scrollLeft + document.body.scrollLeft; var y = e.clientY + document.documentElement.scrollTop + document.body.scrollTop; var screenW = document.body.clientWidth + document.documentElement.scrollLeft + document.body.scrollLeft;; var screenH = document.body.clientHeight + document.documentElement.scrollTop + document.body.scrollTop; var bodyObj = document.getElementsByTagName('body')[0]; bodyObj.onmouseout = function(e){ // stopMouse(); } bodyObj.onfocus = function(e){ moveMouse(); } var curObj = document.getElementById('cursorCont'); if(!curObj){ var curObj = document.createElement('DIV'); curObj.id = 'cursorCont'; curObj.style.position = 'absolute'; curObj.style.width = curWidth + 'px'; curObj.style.height = curHeight + 'px'; curObj.style.overflow = 'hidden'; for(var i=0; i screenH){ var diffY = cursorB - screenH; diffY = (diffY > curHeight) ? curHeight : diffY; curObj.style.height = curHeight - diffY; if(diffY == curHeight){ curObj.style.visibility = 'hidden'; curObj.style.display = 'none'; curObj.style.height = curHeight; }else{ curObj.style.visibility = 'visible'; curObj.style.display = 'block'; } } if(cursorR > screenW){ var diffX = cursorR - screenW; diffX = (diffX > curWidth) ? curWidth : diffX; curObj.style.width = curWidth - diffX; if(diffX == curWidth){ curObj.style.visibility = 'hidden'; curObj.style.display = 'none'; curObj.style.width = curWidth; }else{ curObj.style.visibility = 'visible'; curObj.style.display = 'block'; } } curT = setTimeout("stopFire()",1000); } function stopFire(){ var contObj = document.getElementById('cursor_1'); contObj.style.visibility = 'hidden'; } function show_giftwrapper(totl_amount, gift_amt, val){ if(document.getElementById('giftwrapper').checked == true || val == 1){ document.getElementById('show_giftwrapmsg').style.visibility = 'visible'; document.getElementById('show_giftwrapmsg').style.display = 'block'; document.getElementById('gift_cost').style.visibility = 'visible'; document.getElementById('gift_cost').style.display = 'block'; document.getElementById('gift_costval').style.visibility = 'visible'; document.getElementById('gift_costval').style.display = 'block'; if(document.getElementById('final_total').innerHTML>0){ var totl_amt=parseFloat(gift_amt)+ parseFloat(totl_amount); document.getElementById('final_total').innerHTML = number_format(totl_amt,2); } document.getElementById('gift_check').value = gift_amt; }else{ document.getElementById('show_giftwrapmsg').style.visibility = 'hidden'; document.getElementById('show_giftwrapmsg').style.display = 'none'; document.getElementById('gift_cost').style.visibility = 'hidden'; document.getElementById('gift_cost').style.display = 'none'; document.getElementById('gift_costval').style.visibility = 'hidden'; document.getElementById('gift_costval').style.display = 'none'; if(document.getElementById('final_total').innerHTML>0){ document.getElementById('final_total').innerHTML = number_format(totl_amount,2); } document.getElementById('gift_check').value = ""; } } function showHideMenu(id,status){ var divObj = document.getElementById(id); if(status == 1){ divObj.style.visibility = 'visible'; divObj.style.display = 'block'; }else if(status == 2){ divObj.style.visibility = 'hidden'; divObj.style.display = 'none'; } } function unsetSubCat(id){ t = setTimeout("showHideMenu('" + id + "',2)",100); } function changeProdImg(nextImg,nextZoomImg){ document.getElementById('small_img').src = '/binary_data/'+nextImg; document.getElementById('large_img').src = '/binary_data/'+nextZoomImg; } function changeShippingCost(countryVal){ var shipCostVal; if(countryVal == 2){ shipCostVal = '12'; document.getElementById('shipotherCountryTxt').style.visibility='visible'; document.getElementById('shipotherCountryTxt').style.display='block'; }else{ shipCostVal = '5'; document.getElementById('shipotherCountryTxt').style.visibility='hidden'; document.getElementById('shipotherCountryTxt').style.display='none'; document.getElementById('shipotherCountry').value=''; } document.getElementById('shipCost').innerHTML = format_number(shipCostVal,2,',',' '); document.getElementById('shipping_val').value = shipCostVal; document.getElementById('final_total').innerHTML = format_number(parseFloat(document.getElementById('totalBfrShipping').value)+ parseFloat(shipCostVal),2,',',' '); } function showOtherBillCountry(countryVal){ if(countryVal == 2){ document.getElementById('otherCountryTxt').style.visibility='visible'; document.getElementById('otherCountryTxt').style.display='block'; }else{ document.getElementById('otherCountryTxt').style.visibility='hidden'; document.getElementById('otherCountryTxt').style.display='none'; document.getElementById('otherCountry').value=''; } } function changeBillingEmail(){ var obj1 = document.Confirm_form.ship_mode[1]; var obj2 = document.getElementById('billemail'); var obj3 = document.getElementById('shipemail'); if((obj1.checked) && (obj2.value == '' || obj2.value == ' ')){ obj2.value = obj3.value; } }