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){ if(num == 1){ for(var i=1;i<=28;i++){ document.getElementById('fieldval_'+ i).style.visibility = 'hidden'; document.getElementById('fieldval_'+ i).style.display = 'none'; } }else{ for(var i=1;i<=28;i++){ document.getElementById('fieldval_'+ i).style.visibility = 'visible'; document.getElementById('fieldval_'+ i).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'; }