function showToLogo(objLink)
{
	var img_logo = document.getElementById('product_logo');
	img_logo.href=objLink.href;
	img_logo.getElementsByTagName("img")[0].src=objLink.getElementsByTagName("img")[0].src;
}

function initToLogo()
{
	
	if (!document.getElementsByTagName){ return; }
	var anchors = document.getElementsByTagName("a");

	// loop through all anchor tags
	for (var i=0; i<anchors.length; i++){
		var anchor = anchors[i];

		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "to_product_logo")){
			anchor.onclick = function () {showToLogo(this); return false;}
		}
	}
}


function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}

}


addLoadEvent(initToLogo);

