<!--
//	if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){
//		cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";
//	}else{
//		cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";
//	}
//
//	var bodyCSS='* html {background:url(images/spacer.gif) fixed;background-repeat: repeat;background-position: right bottom;}';
//	
//	var fixedCSS='#divContents{position:fixed;';
//	var fixedCSS=fixedCSS+'_position:absolute;';
//	var fixedCSS=fixedCSS+'overflow:auto;';
//	var fixedCSS=fixedCSS+cot_t1_DOCtp+'}';
//	
//	document.write('<style type="text/css">'+bodyCSS+fixedCSS+'</style>');
    
    var previousmenu = -1;
    
    function showCategory(id,previous)
    {
		try{
			if(previousmenu==-1)previousmenu=previous;
		} catch (ex) {
			previousmenu=0;
		}
    
		document.getElementById('div_'+id).className='menu_bk_on';

		if(document.getElementById('div_'+id+'_children').style.display=='none')
		{
			try {
				if(id!=previousmenu)
				{
					document.getElementById('div_'+previousmenu).className='menu_bk_off';
					document.getElementById('div_'+previousmenu+'_children').style.display='none';
				}
			} catch (ex) {
				//Do nothing
			}
			document.getElementById('div_'+id+'_children').style.display='';
		}
		else
		{
			document.getElementById('div_'+previousmenu).className='menu_bk_on_special';
			document.getElementById('div_'+id+'_children').style.display='none';
		}
		previousmenu = id;
   }
	
	var cartWidth;
	function cartSize()
	{
		var showcart = readCookie("cartvisible");
		cartWidth = getItemWidth(document.getElementById('yourcart_item_container'));

		if(showcart!=0) 
		{
			if(cartWidth>600)document.getElementById("yourcart_item_container").style.width="600px";
		}
		else
		{
			document.getElementById('yourcart_item_container').style.display='none';
			document.getElementById('yourcart_col_3').style.display='none';
			document.getElementById('carttogglebutton').src=document.getElementById('carttogglebutton').src.replace('btn_hidecart','btn_viewcart');
		}
	}

	function toggleCart()
	{
		if(document.getElementById('yourcart_item_container').style.display=='none')
		{
			document.getElementById('yourcart_item_container').style.display='';
			showCart(0,cartWidth>600 ? 600 : cartWidth);
			createCookie("cartvisible",1,1);
		}
		else
		{
			hideCart(getItemWidth(document.getElementById('yourcart_item_container')));
			createCookie("cartvisible",0,1);
		}
	}
    
	function hideCart(width)
	{
		if(width>0)
		{
			document.getElementById('yourcart_item_container').style.width=width+'px';
			setTimeout("hideCart(" + (width - 20) + ");", 1);
		}
		else
		{
			document.getElementById('yourcart_item_container').style.display='none';
			document.getElementById('yourcart_item_container').style.width='';
			document.getElementById('yourcart_col_3').style.display='none';
			setTimeout("document.getElementById('carttogglebutton').src=document.getElementById('carttogglebutton').src.replace('btn_hidecart','btn_viewcart');", 300);
		}
    }
    
	function showCart(width,maxwidth)
	{
		if(width<maxwidth)
		{
			document.getElementById('yourcart_item_container').style.width=width+'px';
			setTimeout("showCart(" + (width + 20) + "," + maxwidth + ");", 1);
		}
		else
		{
			document.getElementById('yourcart_item_container').style.width=(maxwidth==600 ? 600 : maxwidth + 20)+'px';
			document.getElementById('yourcart_item_container').style.display='';
			document.getElementById('yourcart_col_3').style.display='';
			setTimeout("document.getElementById('carttogglebutton').src=document.getElementById('carttogglebutton').src.replace('btn_viewcart','btn_hidecart');", 300);
		}
    }
    
    function getHeight() {
	    var height = window.innerHeight;
	    
    	if(height==undefined)
	    {
	        height = document.documentElement.clientHeight;
	        
	        if(height==0){height=document.body.clientHeight;}
	    }

        return height-25;
    }
    
    function getWidth() {
	    var width = window.innerWidth;
	    
    	if(width==undefined)
	    {
	        width = document.documentElement.clientWidth;
	        
	        if(width==0){width=document.body.clientWidth;}
	    }

        return width;
    }
    
	var leftMargin = undefined;
	
	function page_onresize()
	{
		try {
			if(leftMargin == undefined)leftMargin=(document.body.scrollWidth-988)/2;
		
			if(leftMargin<0){leftMargin=0};
			
			document.getElementById('head').style.left=(leftMargin+200)+'px';
			document.getElementById('left').style.left=leftMargin+'px';
			document.getElementById('foot').style.left=leftMargin+'px';
			document.body.style.marginLeft=leftMargin+'px';
		} catch (ex) {
			//Do nothing
		}	
	
		try {
			if(getHeight()-220-getItemHeight(document.getElementById('menu')) > 0)
			{
				document.getElementById('menuspacer').style.height=(getHeight()-220-getItemHeight(document.getElementById('menu'))).toString()+'px';
				document.getElementById('footer_text').style.display='';
			}
			else
			{
				document.getElementById('footer_text').style.display='none';
			}
		} catch (ex) {
			document.getElementById('menuspacer').style.display='none';
		}	
	}

    function getItemWidth(item) {
	    width = item.offsetWidth;

    	if(width==undefined)
	    {
	        width = item.clientWidth;
	    }

        return width;
    }

    function getItemHeight(item) {
	    var Height = item.offsetHeight;
	    
    	if(Height==undefined)
	    {
	        Height = item.clientHeight;
	    }

        return Height;
    }
	
	function setDimensions(height,pad)
{
		var agt=navigator.userAgent.toLowerCase();
		var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));


		if(is_ie){
			document.getElementById('divtest').style.height="100%"
			document.getElementById('divMenu').style.height="100%"
			document.getElementById('tblMenu').height="100%"
		}else{
			document.getElementById('divMenu').style.height=getHeight()-30 + "px"
			if(pad==undefined)
			{
				document.getElementById('divtest').style.height=getHeight()-height + "px";
			}
			else
			{
				document.getElementById('divtest').style.height=getHeight()-height + pad + "px";
			}
		}
}

function createCookie(name, value, days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        var expires = "; expires=" + date.toGMTString();
    }
    else var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }
    return null;
}

function toggleLayer(elem) {
    elem = elem.parentNode.getElementsByTagName("div")[0];

    var vis;

    vis = elem.style;  // if the style.display value is blank we try to figure it out here

    try {
        if (vis.display == '' && elem.offsetWidth != undefined && elem.offsetHeight != undefined)
            vis.display = (elem.offsetWidth != 0 && elem.offsetHeight != 0) ? 'block' : 'none';

        vis.display = (vis.display == '' || vis.display == 'block') ? 'none' : 'block';
    } catch (ex) {
        vis.display = '';
    }

}
//-->