﻿//<!-- 
		
    function getWidth() 
    {
        var myWidth = 0;
        if( typeof( window.innerWidth ) == 'number' ) 
        {
            //Non-IE
            myWidth = window.innerWidth;
        } 
        else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
        {
            //IE 6+ in 'standards compliant mode'
            myWidth = document.documentElement.clientWidth;
        } 
        else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
        {
            //IE 4 compatible
            myWidth = document.body.clientWidth;
        }
        
        return myWidth;
    }

    function getHeight() 
    {
        var myHeight = 0;
        if( typeof( window.innerWidth ) == 'number' ) 
        {
            //Non-IE
            myHeight = window.innerHeight;
        } 
        else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
        {
            //IE 6+ in 'standards compliant mode'
            myHeight = document.documentElement.clientHeight;
        } 
        else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
        {
            //IE 4 compatible
            myHeight = document.body.clientHeight;
        }
        
        return myHeight;
    }
    
	function ViewInfoLayer(e,text,textClose)
	{
		var o = document.getElementById('InfoLayer');
		o.style.left = e.clientX + document.documentElement.scrollLeft + 'px';
		o.style.top = e.clientY + document.documentElement.scrollTop + 'px';
		o.style.visibility = '';
		o.innerHTML = '' + text + '<p><a href="#" onclick="HideInfoLayer(); return false">' + textClose + ' <img src="../images/layoutimages/buttonCloseSmall.gif" border=0 /><\/a>';
		
		return false;
	}
	
	function HideInfoLayer()
	{
		var o = document.getElementById('InfoLayer');
		o.style.visibility = 'hidden';
	}
    
	function ViewCartPopup()
	{
		var o = document.getElementById('m_ShoppingCartPopup');
		o.style.visibility = '';
		o.style.zIndex='100';
		
		//o.style.left = (getWidth() / 2) + 30 + 'px';
		//o.style.top = '52px';
		
		return false;
	}
	
	function HideCartPopup()
	{
		var o = document.getElementById('m_ShoppingCartPopup');
		o.style.visibility = 'hidden';
		o.style.zIndex = '0';
		
		return false;
	}
				
    function Count(text,long,errortext) 
    {
        var maxlength = new Number(long); // Change number to your max length.
        if (text.value.length > maxlength)
        {
            text.value = text.value.substring(0,maxlength);
            alert(errortext);
        }
    }

    function openWindow(source,name,width,height)
    { 
        window.open(source,name,'menubar=no,scrollbars=yes,toolbar=no,location=no,status=no,resizable=yes,width=' + width + ',height=' + height); 
    } 
    
    function openNewWidow(url)
    {
        window.open(url,null,"height=510,width=480,status=no,toolbar=no,menubar=no,location=no");
    }
	
//-->
