if (top.location != self.location) {  top.location.replace(self.location);}$(document).ready(function(){	$('li.headlink').hover(		function() { $('ul', this).css('display', 'block'); },		function() { $('ul', this).css('display', 'none'); });});window.onload=function() {  Nifty("div#product-info","small");  Nifty("div#department-listing","small");}function x(){	 $("img.small_thumb").each( function() {			var maxWidth, maxHeight;	    var imgWidth = $(this).width();    // Current image width	    var imgHeight = $(this).height();  // Current image height		  if (maxWidth == undefined) maxWidth = 90;		  if (maxHeight == undefined) maxHeight = 90;		  if (imgWidth == undefined || imgWidth == null || imgWidth==0){  			imgWidth=maxWidth;  			imgHeight=maxHeight;		  }			ratio_x = maxWidth / imgWidth;			ratio_y = maxHeight / imgHeight;			if (ratio_x < ratio_y) {				ratio = ratio_x;			} else if (ratio_x > ratio_y) {				ratio = ratio_y;			} else {				ratio = 1;				if (imgWidth > maxWidth) {					imgWidth = maxWidth;				  imgHeight = maxHeight;				}			}			if (ratio>1) ratio=1;	// do not scale if it's less than the max length.			width = Math.round(imgWidth * ratio);			height =  Math.round(imgHeight * ratio);			$(this).width(width);			$(this).height(height);			$(this).css("width", width);			$(this).css("height", height);	 	}	); 		//image_scaler('small_thumb',90,90);}function scale_image(img_id, maxWidth, maxHeight) {  var element = document.getElementById(img_id);  var imgWidth = element.width;  var imgHeight = element.height;//  if (element == undefined || element == null) return false;  if (maxWidth == undefined) maxWidth = 90;  if (maxHeight == undefined) maxHeight = 90;  if (imgWidth == undefined || imgWidth == null || imgWidth==0){  	imgWidth=maxWidth;  	imgHeight=maxHeight;  }	ratio_x = maxWidth / imgWidth;	ratio_y = maxHeight / imgHeight;	if (ratio_x < ratio_y) {		ratio = ratio_x;	} else if (ratio_x > ratio_y) {		ratio = ratio_y;	} else {		ratio = 1;		if (imgWidth > maxWidth) {			imgWidth = maxWidth;		  imgHeight= maxHeight;		}	}	if (ratio>1) ratio=1;	// do not scale if it's less than the max length.	width = Math.round(imgWidth * ratio);	height = Math.round(imgHeight * ratio)  element.width = width;  element.height = height;  element.style.width = width;  element.style.height = height;}function bookmark() {  var pgUrl = window.location.href;  var pgTitle = document.title;  if (window.sidebar) {    window.sidebar.addPanel(pgTitle, pgUrl,"");  } else if(document.all) {    window.external.AddFavorite(pgUrl, pgTitle);  } else if(window.opera && window.print) {    var elem = document.createElement('a');    elem.setAttribute('href',pgUrl);    elem.setAttribute('title',pgTitle);    elem.setAttribute('rel','sidebar');    elem.click();  }}function socialBookmark(site,title) {  if (title == undefined) title ='';  var pgUrl = window.location.href;  var pgTitle = document.title;  var bkUrl = site + pgUrl + '&'+ title + '=' + pgTitle;  window.open(bkUrl);}function popWindow(page, name, width, height) {  if (width == undefined) width = 400;  if (height == undefined) height = 400;  window.open(page, 'LargeImage', 'width=' + width + ',height=' + height + ',menubar=no,scrollbars=no,toolbar=no,location=yes,directories=no,resizable=no,top=200,left=300');}// Function to remember the settingsfunction setCookie (name, value) {	var argv = setCookie.arguments;	var argc = setCookie.arguments.length;	var expires = (argc > 2) ? argv[2] : null;	var path = (argc > 3) ? argv[3] : null;	var domain = (argc > 4) ? argv[4] : null;	var secure = (argc > 5) ? argv[5] : false;	document.cookie = name + "=" + escape (value) +	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +	((path == null) ? "" : ("; path=" + path)) +	((domain == null) ? "" : ("; domain=" + domain)) +	((secure == true) ? "; secure" : "");}function doRefresh(){	location.reload();}function changeLang(ln){  setCookie('lang',ln);  doRefresh();}function switch_site() {	// get new layer and show it	intlSites = document.getElementById('cur_sites');	intlSites.style.visibility = 'visible';}function closeLayer(id){  layerEle = document.getElementById(id);  layerEle.style.visibility = 'hidden';}