function open_popup(winurl, winname, winparams) 
	{
		if (winname == ''|| winname == null)
		{ 
			winname = 'productpopup'; 
		}
		if (winparams == ''|| winparams == null) 
		{ 
			winparams = 'menubar=0,toolbar=0,directories=0,status=0,scrollbars=1,resizable=1,alwaysRaised=yes,width=615,height=550,top=0,left=0'; 
		}
		window.open(winurl, winname, winparams)
 	}
 	
function replaceAll( str, from, to ) 
 	{
    	var idx = str.indexOf( from );
    	while ( idx > -1 ) 
    	{
        	str = str.replace( from, to ); 
        	idx = str.indexOf( from );
    	}
    return str;
	}
	
function callUrl(url,basePath,relativePath,siteDivision)
{
	basePath = replaceAll(basePath,"~","");
	var newUrl = "";
	if(url.indexOf("http") == -1) 
	{
		if(url.indexOf(relativePath) == -1) 
		{
			newUrl = basePath+url 
		}
		else
		{
			newUrl = replaceAll(url,relativePath,basePath+"/"+siteDivision)
		}
	}
	location.href= newUrl
}

function ChangeDivContent(id, str) {
	if (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) Browsertype="OP"; 
	if (document.all) Browsertype="IE"; 
	if (document.layers) Browsertype="NN"; 
	if (!document.all && document.getElementById) Browsertype="MO"; 

	if (Browsertype=="IE") {
		document.all[id].innerHTML = str;
	}
	if (Browsertype=="NN") {
		document.layers[id].document.open();
		document.layers[id].document.write(str);
		document.layers[id].document.close();
	}
	if (Browsertype=="MO" || Browsertype=="OP") {
		document.getElementById(id).innerHTML = str;
	}
}