
var LastEvent;
var TimeoutID;

function delete_item(goWhere, itemName)
{
	if (confirm("Are you sure you want to delete this " + itemName + "?   "))
	{
		if (itemName == 'category')
		{
			if (confirm("All the products that are related to this category will also be deleted.   \nAre you absolutely sure?"))
			{
				window.open(goWhere, '_self');
			}
		}
		else
		{
			window.open(goWhere, '_self');
		}
	}
}

function front_button_over(tdCell)
{
	tdCell.style.backgroundImage = "url('images/button_over.gif')";
}

function front_button_out(tdCell)
{
	tdCell.style.backgroundImage = "url('images/button_normal.gif')";
}

function Do_OutDelay()
{
	var varFunc;
		
	varFunc = "MM_Out_showHideLayers(";
	
	for(i=0;i<Do_OutDelay.arguments.length;++i)
	{
		if(i > 0)
			varFunc += ",";
			
		varFunc += "'"+ Do_OutDelay.arguments[i] +"'";
	}
	
	varFunc += ")";
	
	LastEvent = "mouseout";
	
	TimeoutID = setTimeout(varFunc,1000);
}

function Do_OverDelay()
{
	if(LastEvent == "mouseout" && TimeoutID != ""){
		window.clearTimeout(TimeoutID)
		
		TimeoutID = "";
	}
	
	LastEvent = "mouseover";
	
	var varFunc;
	
	varFunc = "MM_showHideLayers(";
	
	for(i=0;i<Do_OverDelay.arguments.length;++i)
	{
		if(i > 0)
			varFunc += ",";
			
		varFunc += "'"+ Do_OverDelay.arguments[i] +"'";
	}
	
	varFunc += ")";
	
	
	
	setTimeout(varFunc,1);
	
}

function MM_openBrWindow(theurl,winName) { //v2.0
  
  if(theurl != "doFlip()")
  	window.open(theurl,winName);
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,d,obj,obj2,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; d=args[i+2];
	
	if (obj.style) { obj2=obj.style; v=(v=='show')?'':(v=='hide')?'none':v; }
		if (obj2.display == "") {
			obj2.display="none";
		}
		else {
			obj2.display=v;
		}
	
	if (obj.style) { obj=obj.style; d=(d=='show')?'visible':(d=='hide')?'hidden':d; }
		if (obj.visibility == "show") {
			obj.visibility="hide";
		}
		else {
			obj.visibility=v;
		}
	}
}

function MM_Out_showHideLayers() { //v6.0
  var i,p,v,d,obj,obj2,args=MM_Out_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; d=args[i+2];
    
	if (obj.style) { obj2=obj.style; v=(v=='show')?'':(v=='hide')?'none':v; }
    obj2.display=v;
	
	if (obj.style) { obj=obj.style; d=(d=='show')?'visible':(d=='hide')?'hidden':d; }
    obj.visibility=d;
	}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function doFlip()
{
}

function Change_Span(varStyle)
{	
	var el = event.srcElement;
	
	el.className = varStyle;
}

function button_over(eButton){
		if (eButton.style.backgroundColor == "#bcbccf") {
			eButton.style.backgroundColor = "#9c9cb8";
		}
	}
function button_out(eButton){
		if (eButton.style.backgroundColor == "#9c9cb8") {
			eButton.style.backgroundColor = "#bcbccf";
		}
	}
	
	function button_over2(eButton){
		if (eButton.style.backgroundColor == "#ffffff") {
			eButton.style.backgroundColor = "#ffffcc";
		}
	}
function button_out2(eButton){
		if (eButton.style.backgroundColor == "#ffffcc") {
			eButton.style.backgroundColor = "#ffffff";
		}
	}
	
function sml_button_out(eButton, varColor){
	}	
function button_down(eButton){
	}
function button_up(eButton){
	}

function Div_BGColor(objDiv, varColor, varBorderColor, varTextColor){
	}
	
function front_button_over(tdCell)
{
	tdCell.style.backgroundImage = "url('images/button_over.gif')";
}

function front_button_out(tdCell)
{
	tdCell.style.backgroundImage = "url('images/button_normal.gif')";
}
