function product_info(id) {
	for (i=1; i<=4; i++) {
		var product = document.getElementById("product_" + i);
		if (i != id || id == null) {
			product.style.left = "-9999px";
		}
		else {
			product.style.left = "15px";
		}
	}
}

sfHover = function() {
	var sfEls = document.getElementById("product_nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	var sfElss = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfElss.length; i++) {
		sfElss[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfElss[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


function placement(el, num) {
	var divs = el.getElementsByTagName("div");
	var li_height = el.offsetHeight;
	for (var i = 0; i < divs.length; i++) {
		if (divs[i].className == "bg") {
			var div_height = divs[i].offsetHeight;
			switch (num) {
				case 1 :
					divs[i].style.top = "0";
				break;
				case 2 :
					divs[i].style.top = ((div_height/2)*-1) + (li_height/2) + "px";
				break;
				case 3 :
					divs[i].style.top = ((div_height/2)*-1) + (li_height/2) + "px";
				break;
				case 4 :
					divs[i].style.top = "-" + (div_height - li_height)  + "px";
				break;
			}
		}
	}
}

function getArgs() {
    var args = new Object();
    var query = location.search.substring(1);  // Get query string.
    var pairs = query.split("&");              // Break at &.
    for(var i = 0; i < pairs.length; i++) {
	var pos = pairs[i].indexOf('=');       // Look for "name=value".
	if (pos == -1) continue;               // If not found, skip.
	var argname = pairs[i].substring(0,pos);  // Extract the name.
	var value = pairs[i].substring(pos+1); // Extract the value.
	args[argname] = unescape(value);          // Store as a property.
    }
    return args;                               // Return the object.
}

function callEBTracklink(actID){
	    var ebRand = Math.random()+ ' ';
	    ebRand = ebRand * 1000000;
	    PCImage = new Image();
	    PCImage.src = "HTTP://bs.serving-sys.com/BurstingPipe/ActivityServer.bs?cn=as&amp;ActivityID="+actID+"&rnd=" + ebRand;
    }

