// Show - Hide Div

function hidediv(me){

document.getElementById(me).style.visibility= "hidden";

}

function showdiv(me){

var screenwidth = document.body.clientWidth;

var screenheight = document.body.clientHeight;

document.getElementById(me).style.top = screenheight/3;

document.getElementById(me).style.left = screenwidth/3;

document.getElementById(me).style.visibility= "visible";

}

//Pop Window

function popUp(page,PWidth,PHeight,id){

eval("designerwiz"+id+"=window.open('"+page+"','designerwiz1','toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0,width="+PWidth+",height="+PHeight+"')")

eval("designerwiz"+id+".window.moveTo((screen.width/2)-(PWidth/2),(screen.height/2)-(PHeight/2))")

}

//Popup for Review

function writereview1(URL) {day = new Date();id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=250,left = 287,top = 259');");}

function readreview1(URL) {day = new Date();id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=460,height=450,left = 277,top = 159');");}



//popup extra window

function wpopup(page,PWidth,PHeight,id){

eval("perfume"+id+"=window.open('"+page+"','designerwiz1','toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0,width="+PWidth+",height="+PHeight+"')")

eval("perfume"+id+".window.moveTo((screen.width/2)-(PWidth/2),(screen.height/2)-(PHeight/2))")

}

/////Bookmark

function addBookmark(title,url) {

if (window.sidebar) { 

window.sidebar.addPanel(title, url,""); 

} else if( document.all ) {

window.external.AddFavorite( url, title);

} else if( window.opera && window.print ) {

return true;

}

}

/// Tracking Window Popup

function pop_track(url) {

var popit = window.open(url,'console','menubar=0,toolbar=0,location=0,directories=0,status=0,scrollbars,resizable=0,width=590,height=670');

 }

// remove error icon from status bar

function ClearError() {

window.status = "Done";

return true;

}

window.onerror = ClearError;
//////////////////////////////////////////
// Fixing Firefox 3.0 issue by AS 290109//
//////////////////////////////////////////
function ff3fix(){
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
 var ffversion=new Number(RegExp.$1)
 if (ffversion>=3){
	 document.getElementById('leftnav').style.width="185px";
	if(document.getElementById('utilitylink-box')){
		 document.getElementById('utilitylink-box').style.display="block";
 		 document.getElementById('utilitylink-box').style.paddingTop="15px";
	}
	if(document.getElementById('ordertable')){
		 document.getElementById('ordertable').style.width="323px";
	}
	if(document.getElementById('youmay')){
		 document.getElementById('youmay').style.float="right";
	}
 }
}

}

// Event Listner Function for call firefox fixing function
function addEvent(obj, evType, fn){ 
 if (obj.addEventListener){ 
   obj.addEventListener(evType, fn, false); 
   return true; 
 } else if (obj.attachEvent){ 
   var r = obj.attachEvent("on"+evType, fn); 
   return r; 
 } else { 
   return false; 
 } 
}
addEvent(window, 'load', ff3fix);