function createCookie(name,value,days)
{	
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function GetCookie(name) 
{  
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
function checkCookie(id, name, path)
{
		var height=0;
		var username = GetCookie('Wirester_Recent');
		if(username == null)
		{
			createCookie('Wirester_Recent','1');
		}
		if(username=='2')
		{
			height=150;
			str='<iframe src="http://209.85.100.184/ystore/Wirester/scripts/recent_view.php?name=' + name + '&id='+ id + '&path=' + path + '" width="180" height="' + height + '" scrolling="no" frameborder="0"></iframe>';
			document.write(str);
		}
		else if(username=='1')
		{
			createCookie('Wirester_Recent','2');
			height=100;
			str='<iframe src="http://209.85.100.184/ystore/Wirester/scripts/recent_view.php?name=' + name + '&id='+ id + '&path=' + path + '" width="180" height="' + height + '" scrolling="no" frameborder="0"></iframe>';
			document.write(str);
		}
		else if(name!='None' && id!='None')
		{
			createCookie('Wirester_Recent','1');
			str='<iframe src="http://209.85.100.184/ystore/Wirester/recent_view.php?name=' + name + '&id='+ id + '&path=' + path + '" width="180" height="' + height + '" scrolling="no" frameborder="0" style="display:none;"></iframe>';
/*			document.write(str);*/
		}
}

function Bookmark(){
if (window.sidebar) // firefox
	window.sidebar.addPanel("www.wirester.com - " + document.title, window.location , "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',window.location);
	elem.setAttribute('title',document.title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(window.location, 'wirester.com - ' + document.title);
}