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 showHideShip(num){ Obj = document.getElementById('shipInfo'); if(Obj){ if(num == 1){ Obj.style.visibility = 'hidden'; Obj.style.display = 'none'; }else{ Obj.style.visibility = 'visible'; Obj.style.display = 'block'; } } } 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'; } var count = 0; function showHideGift(objval){ Obj = document.getElementById('noteCaption'); ObjVal = document.getElementById('noteMessg'); ObjVal2 = document.getElementById('withoutNote'); if(Obj){ if(document.getElementById('gift_wrap').checked == true || objval == 1){ document.getElementById('giftwrapper').value = 1; Obj.style.visibility = 'visible'; Obj.style.display = 'block'; ObjVal.style.visibility = 'visible'; ObjVal.style.display = 'block'; ObjVal2.style.visibility = 'hidden'; ObjVal2.style.display = 'none'; if(count==0){ Obj2 = document.getElementById('final_total').innerHTML; Obj2 = Obj2*1; Obj2 = roundVal(Obj2+3.95); document.getElementById('final_total').innerHTML = number_format(Obj2,2); count++; } }else{ document.getElementById('giftwrapper').value = 0; Obj.style.visibility = 'hidden'; Obj.style.display = 'none'; ObjVal.style.visibility = 'hidden'; ObjVal.style.display = 'none'; ObjVal2.style.visibility = 'visible'; ObjVal2.style.display = 'block'; if(count==1){ Obj2 = document.getElementById('final_total').innerHTML; Obj2 = Obj2*1; Obj2 = roundVal(Obj2-3.95); document.getElementById('final_total').innerHTML = number_format(Obj2,2); count--; } } } } function roundVal(val){ var dec = 2; var result = Math.round(val*Math.pow(10,dec))/Math.pow(10,dec); return result; } function showGift(num){ Obj = document.getElementById('giftWrap'); if(num == 1){ Obj.style.visibility = 'visible'; Obj.style.display = 'block'; }else{ Obj.style.visibility = 'hidden'; Obj.style.display = 'none'; } } function decrementqty(){ Obj = document.getElementById('tdqty'); Obj2 = document.getElementById('tdqty').innerHTML; Obj2 = Obj2*1; Obj2--; document.getElementById('tdqty').innerHTML = Obj2; } function incrementqty(){ Obj = document.getElementById('tdqty'); Obj2 = document.getElementById('tdqty').innerHTML; Obj2 = Obj2*1; Obj2--; document.getElementById('tdqty').innerHTML = Obj2; }