	function RedirTag(TagID, SiteCount)
	{
		if (SiteCount>1)
		{
		
		window.location = "SiteList.asp?TagID="+TagID
		}
		else
		{
		
		window.open("Tagredir.asp?TagID="+TagID)
		}
	}

	function UpdateTag(Tid)
	{
	//alert(Tid)
	HostPath = window.location.hostname
	frames['UpTagFrm'].location.href='http://'+HostPath+'/TagUpdate.asp?TagID='+Tid;
	}
	

////////////////////////////////////////////
	
	function SetFav(FavID,TagCount, NumOfTags)
	{
	StarSrc =  document["star"+FavID+"_"+TagCount].src
	HostPath = window.location.hostname	
	frames['UpTagFrm'].location.href ="/SetFav.asp?FavID="+FavID
	
		if (StarSrc == "http://"+HostPath+"/Images/star_.gif")
		{
			for (StarCount=0; StarCount < NumOfTags; StarCount++)
			{
				if(document["star"+FavID+"_"+StarCount])
				{
				document["star"+FavID+"_"+StarCount].src = "/Images/star_on.gif"
				}
			}
		}
		else
		{
			for (StarCount=0; StarCount < NumOfTags; StarCount++)
			{
				if(document["star"+FavID+"_"+StarCount])
				{
				document["star"+FavID+"_"+StarCount].src = "/Images/star_.gif"
				}
			}
		}
	}
	
	
//////////////////////////////////////
	startList = function(TagID) 
	{

		document.getElementById("TagName"+TagID).onmouseover=function() 
		{
			document.getElementById("TagSiteHint"+TagID).style.display= 'block';
		};
		document.getElementById("TagName"+TagID).onmouseout=function() 
		{
			document.getElementById("TagSiteHint"+TagID).style.display= 'none';
		};				
	}

///////////////////////////////////////


function bookmark()
{
	
    var Favtitle="The TagDen - Tag Based Web Index"
    var Favurl="http://www.TagDen.com"

    if (window.sidebar) 
    { 
        window.sidebar.addPanel(Favtitle, Favurl,"");
       // alert("Firefox users: This link will open in your Sidebar\nrather than the main page!\nTo prevent this please right click the link and choose\n'Properties' and then uncheck the box marked:\n'Load This Bookmark in the Sidebar'\n\nSorry about this, but it is unavoidable with Firefox");
 		// alert("משתמשי פיירפוקס: יש להוסיף קישור זה ל\n Bookmarks Toolbar \n על מנת להוסיפו לתפריט הלינקים העליון'");
    } else if( window.opera && window.print ) 
    { 
   		//alert("Opera users: By Default this link will open in your Sidebar\nrather than the main page!\nTo prevent this please uncheck the box marked\n'Show in Panel' that appears on the Add Bookmark window\n\nSorry about this, but it is currently unavoidable with Opera");
		//alert("משתמשי אופרה: לינק זה יפתח בסרגל הצד ולא בחלון הראשי \n על מנת למנוע זאת  עליכם להוריד את הסימון מ\n 'Show in Panel'");
    var mbm = document.createElement('a');
    mbm.setAttribute('rel','sidebar');
    mbm.setAttribute('href',Favurl);
    mbm.setAttribute('Favtitle',Favtitle);
    mbm.click();
    } else if( document.all ) 
    { 
    window.external.AddFavorite( Favurl, Favtitle); 
    } 

}
////////////////////////////////////////////////////

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=/";
	
	if (name == 'SetOPage')
	{
		alert("This Page Was selected as your opening page")
		location.reload(true);
	}
}

function readCookie(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 eraseCookie(name) {
	createCookie(name,"",-1);
}


function PlaceLBanner ()
{
	if(document.body.clientWidth <= 1160)
	{
	document.getElementById("LbnrDiv").style.display='none';
	}
	else
	{
	document.getElementById("LbnrDiv").style.display='block';
	}
	return
}	