<!--
	function WriteFooter()
		{
			var footerElement = document.getElementById('divFooterElement');
			var xmlhttp=false;
			if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
			{
	            try { xmlhttp = new XMLHttpRequest(); } 
	            catch (e) { xmlhttp = false; }
            }
            if (!xmlhttp && window.createRequest) 
            {
	            try { xmlhttp = window.createRequest(); } 
	            catch (e) { xmlhttp = false; }
            }

            xmlhttp.open("GET", "/_System/Lib/Content/Navigation/FooterMAS.htm", true);
            xmlhttp.onreadystatechange = function() 
            {
                if (xmlhttp.readyState == 4) 
                {
                    footerElement.innerHTML = xmlhttp.responseText;
                }
            }
            xmlhttp.send(null)
         }
         
	function WriteMultipleRatingElements(p_ProductCode, p_ProductName, p_ImageURL, p_RatingElement) 
        {
			var ratingElement = document.getElementById(p_RatingElement);
            var xmlhttp=false;
            /*@cc_on @*/
            /*@if (@_jscript_version >= 5)
            // JScript gives us Conditional compilation, we can cope with old IE versions.
            // and security blocked creation of the objects.
             try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } 
             catch (e) {
                try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");} catch (E) { xmlhttp = false; }
             }
            @end @*/
            
            if (!xmlhttp && typeof XMLHttpRequest != 'undefined') 
            {
	            try { xmlhttp = new XMLHttpRequest(); } 
	            catch (e) { xmlhttp = false; }
            }
            if (!xmlhttp && window.createRequest) 
            {
	            try { xmlhttp = window.createRequest(); } 
	            catch (e) { xmlhttp = false; }
            }

            xmlhttp.open("GET", "/_System/Lib/Controls/Script/Rating.aspx?id="+p_ProductCode+"&name="+p_ProductName+"&imageurl="+p_ImageURL, true);
            xmlhttp.onreadystatechange = function() 
            {
                if (xmlhttp.readyState == 4) 
                {
					try {
					ratingElement.innerHTML = xmlhttp.responseText;
					}
					catch (e) { alert("Error"); }
                }
            }
            xmlhttp.send(null)
        }
        
	function WriteRatingElements(p_ProductCode, p_ProductName, p_ImageURL) 
        {
			var ratingElement = document.getElementById("RatingElement");
            var xmlhttp=false;
            /*@cc_on @*/
            /*@if (@_jscript_version >= 5)
            // JScript gives us Conditional compilation, we can cope with old IE versions.
            // and security blocked creation of the objects.
             try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } 
             catch (e) {
                try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");} catch (E) { xmlhttp = false; }
             }
            @end @*/
            
            if (!xmlhttp && typeof XMLHttpRequest != 'undefined') 
            {
	            try { xmlhttp = new XMLHttpRequest(); } 
	            catch (e) { xmlhttp = false; }
            }
            if (!xmlhttp && window.createRequest) 
            {
	            try { xmlhttp = window.createRequest(); } 
	            catch (e) { xmlhttp = false; }
            }

            xmlhttp.open("GET", "/_System/Lib/Controls/Script/Rating.aspx?id="+p_ProductCode+"&name="+p_ProductName+"&imageurl="+p_ImageURL, true);
            xmlhttp.onreadystatechange = function() 
            {
                if (xmlhttp.readyState == 4) 
                {
                    ratingElement.innerHTML = xmlhttp.responseText;
                }
            }
            xmlhttp.send(null)
        }
	/************************************************************************
	*   Pre-load Image
	************************************************************************/
	img1Clear = new Image();
	img1Clear.src = "/_System/Lib/Image/1clear.gif";

	/************************************************************************
	*   Function PopUp()
	*       Creates a new popup window
	*
	************************************************************************/
	function PopUp(pstrURL, pstrName, pintWidth, pintHeight, pblnScroll, pblnResize, pblnMenus, pblnStatus)
	{
		intLeftPosition = (screen.width) ? (screen.width/3) : 0;
		intTopPosition = (screen.height) ? (screen.height/3) : 0;		
		
		strSettings = 'width='+pintWidth+',height='+pintHeight+',top='+intTopPosition+',left='+intLeftPosition+'toolbar='+pblnMenus+',location='+pblnMenus+',directories='+pblnMenus+',status='+pblnStatus+',menubar='+pblnMenus+',scrollbars='+pblnScroll+',resizable='+pblnResize;
		objNewWindow = window.open(pstrURL, pstrName, strSettings);
		if(objNewWindow.window.focus)
		{
			objNewWindow.window.focus();
		}
	}

	/************************************************************************
	*   Function MakeNewWindow()
	*       Creates a new popup window
	*
	************************************************************************/
	function MakeNewWindow(strURL, intWidth, intHeight, blnResizeable, blnScrollbars) 
	{
		var strOptions
			strOptions = "width=" + intWidth + ",height=" + intHeight + ",resizable=" + blnResizeable + ",scrollbars=" + blnScrollbars
		
		this.name = "frmMainWindow"
		SourceWindow=window.open(strURL, "" ,strOptions);
		SourceWindow.focus();
		}

	/************************************************************************
	*   Function mouseOver()
	*       changes graphics on a page during mouse events
	*
	************************************************************************/ 
	function mouseOver(strCurrentImage, strNewImage)
	{
		if (parseFloat(navigator.appVersion) >= 3.0)
		{
			document.images[strCurrentImage].src = strNewImage;
		}
	}


	/************************************************************************
	*   Function toggleView()
	*       toggles the Hide / Show style of an element on the page
	*
	************************************************************************/ 
	function toggleView(p_objElement)
	{
		if (document.getElementById(p_objElement).className == "SHOW")
		{
			document.getElementById(p_objElement).className = "HIDE";
		}
		else
		{
			document.getElementById(p_objElement).className = "SHOW"
		}
	} 


	/************************************************************************
	*   Variables: Validation
	*       Validation Masks for use throught the site
	*
	************************************************************************/
	var MASK_ALPHA               = /^([a-z]|[A-Z]|[0-9])+$/;
	var MASK_ALPHA_WITH_SPACES   = /^(\w|\s)+$/;
	var MASK_NUMERIC             = /^(\d)+$/;
	var MASK_NUMERIC_WITH_SPACES = /^(\d|\s)+$/;
	var MASK_DOMAINNAME          = /^([a-z]|[A-Z]|[0-9]|-|\.)+$/;
	var MASK_IPADDRESS           = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;

	/************************************************************************
	*   Function isRequired()
	*       checks to make sure a value exists
	*
	************************************************************************/
	function isRequired(p_strValue)
	{
		if (p_strValue.length > 0 )
			return true;
		else
			return false;
	}

	/************************************************************************
	*   Function isIPAddress()
	*       checks for proper IP Address with regular expressions
	*
	************************************************************************/
	function isIPAddress(p_strIPValue, p_blnRequired)
	{
		var intCount;
		var blnContinue = true;
	    
		//Check to see if required
		if (p_blnRequired == true)
		{
			blnContinue = isRequired(p_strIPValue);
		}
	    
		//Check for proper format
		if (blnContinue == true) 
		{
			var astrIP = p_strIPValue.match(MASK_IPADDRESS);
			if (astrIP == null)
			{
				return false;
			} 
			else 
			{
				for (intCount = 0; intCount < 4; intCount++) 
				{
					if (astrIP[intCount+1] > 255) 
					{
						return false;
					}
				}
			}
		} 
		else 
		{
			return false;
		}
		return true;
	}

	/************************************************************************
	*   Function ValidateCheck()
	*       General Validate check using regular expressions
	*
	************************************************************************/
	function ValidateCheck(p_strValue, p_objMask, p_blnRequired)
	{
		var blnContinue = true;
	    
		//Check to see if required
		if (p_blnRequired == true)
		{
			blnContinue = isRequired(p_strValue);
		}
	    
		//Check for proper format
		if (blnContinue == true) 
		{
			var astrValue = p_strValue.match(p_objMask);
			if (astrValue == null)
			{
				return false;
			} 
		} 
		else 
		{
			return false;
		}
		return true;
	}
	
	/************************************************************************
	*   Function QueryString()
	*       General Validate check using regular expressions
	*
	************************************************************************/
	function QueryString(strValue){
		var astrQuery = unescape(location.search.substr(1)).split('&');

		for(var i=0; i<astrQuery.length; i++){
			var astrItem=astrQuery[i].split('=');
			if(astrItem[0].toLowerCase()==strValue.toLowerCase()) return astrItem[1];
		}
		return '';
	}	
	
	/**
 *	Whatever:hover - V1.42.060206 - hover & active
 *	------------------------------------------------------------
 *	(c) 2005 - Peter Nederlof
 *	Peterned - http://www.xs4all.nl/~peterned/
 *	License  - http://creativecommons.org/licenses/LGPL/2.1/
 *
 *	Whatever:hover is free software; you can redistribute it and/or
 *	modify it under the terms of the GNU Lesser General Public
 *	License as published by the Free Software Foundation; either
 *	version 2.1 of the License, or (at your option) any later version.
 *
 *	Whatever:hover is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *	Lesser General Public License for more details.
 *
 *	Credits and thanks to:
 *	Arnoud Berendsen, Martin Reurings, Robert Hanson
 *
 *	howto: body { behavior:url("csshover.htc"); }
 *	------------------------------------------------------------
 */

var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i,
currentSheet, doc = window.document, hoverEvents = [], activators = {
	onhover:{on:'onmouseover', off:'onmouseout'},
	onactive:{on:'onmousedown', off:'onmouseup'}
}

function parseStylesheets() {
	if(!/MSIE (5|6|7|8)/.test(navigator.userAgent)) return;
	window.attachEvent('onunload', unhookHoverEvents);
	var sheets = doc.styleSheets, l = sheets.length;
	for(var i=0; i<l; i++) 
		parseStylesheet(sheets[i]);
}
	function parseStylesheet(sheet) {
		if(sheet.imports) {
			try {
				var imports = sheet.imports, l = imports.length;
				for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
			} catch(securityException){}
		}

		try {
			var rules = (currentSheet = sheet).rules, l = rules.length;
			for(var j=0; j<l; j++) parseCSSRule(rules[j]);
		} catch(securityException){}
	}

	function parseCSSRule(rule) {
		var select = rule.selectorText, style = rule.style.cssText;
		if(!csshoverReg.test(select) || !style) return;

		var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
		var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
		var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
		var affected = select.replace(/:(hover|active).*$/, '');
		var elements = getElementsBySelect(affected);
		if(elements.length == 0) return;

		currentSheet.addRule(newSelect, style);
		for(var i=0; i<elements.length; i++)
			new HoverElement(elements[i], className, activators[pseudo]);
	}

function HoverElement(node, className, events) {
	if(!node.hovers) node.hovers = {};
	if(node.hovers[className]) return;
	node.hovers[className] = true;
	hookHoverEvent(node, events.on, function() { node.className += ' ' + className; });
	hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
}
	function hookHoverEvent(node, type, handler) {
		node.attachEvent(type, handler);
		hoverEvents[hoverEvents.length] = { 
			node:node, type:type, handler:handler 
		};
	}

	function unhookHoverEvents() {
		for(var e,i=0; i<hoverEvents.length; i++) {
			e = hoverEvents[i]; 
			e.node.detachEvent(e.type, e.handler);
		}
	}

    function getElementsBySelect(rule) {
	    var parts, nodes = [doc];
	    parts = rule.split(' ');
	    for(var i=0; i<parts.length; i++) {
		    nodes = getSelectedNodes(parts[i], nodes);
	    }	return nodes;
    }
	function getSelectedNodes(select, elements) {
		var result, node, nodes = [];
		var identify = (/\#([a-z0-9_-]+)/i).exec(select);
		if(identify) {
			var element = doc.getElementById(identify[1]);
			return element? [element]:nodes;
		}
		
		var classname = (/\.([a-z0-9_-]+)/i).exec(select);
		var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
		var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false;
		for(var i=0; i<elements.length; i++) {
			result = tagName? elements[i].all.tags(tagName):elements[i].all; 
			for(var j=0; j<result.length; j++) {
				node = result[j];
				if(classReg && !classReg.test(node.className)) continue;
				nodes[nodes.length] = node;
			}
		}	
		
		return nodes;
	}
