function urlContentId(url) {var tmp = new RegExp("//(.*)").exec(url);var contentId = tmp[1].split("?")[0].replace(/\./g, "_").replace(/\//g, ".").replace(/\.{2,}/g, ".").toLowerCase();if(contentId[contentId.length-1] == "."){contentId = contentId.substr(0, contentId.length-1);}return contentId.split(";")[0];}
var arVersion = navigator.appVersion.split("MSIE");
var pngFixVersion = parseFloat(arVersion[1]);


function dcstormAddToCart()
{
    logOCPV('isconv=0|pover=/checkout/add-to-cart/');
}

function dcstormAddToWishlist()
{
    logOCPV('isconv=0|pover=/wishlist/add/');
}

function fixPNG(myImage) 
{
	
    if ((pngFixVersion >= 5.5) && (pngFixVersion < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}

function show_info_layer(menuitem,advicediv, left, top, show) {
	if ( jQuery(menuitem).length)
 	{
	 	if(typeof show =='undefined') {
	 		show = 1;
	 	}
	 	var position = jQuery(menuitem).position();
		jQuery(advicediv).css('left',position['left'] +left);
	 	jQuery(advicediv).css('top',position['top'] - top);
	 	if(jQuery(advicediv).is(':visible') && show == 0) {
	    	jQuery(advicediv).fadeOut("slow", function () {});
	    } else {
	    	jQuery('.info_layer').fadeOut("slow", function(){});
	    	jQuery(advicediv).fadeIn("slow", function () {});
	    }
 	}
}

function close_info_layer(menuitem,advicediv) {
	if ( jQuery(menuitem).length)
 	{
	   	jQuery(advicediv).fadeOut("slow", function(){});
 	}
}
