function bookmark(){
if (document.all)
window.external.AddFavorite(location.href,'WallpaperTube.net');
else if (window.sidebar)
window.sidebar.addPanel('WallpaperTube.net', location.href, "")
}

function toggle(s_)
{
  
 var oDiv = document.getElementById(s_);
 if(oDiv.style.display=='none')
 {
	 closeall();
	 oDiv.style.display='block';
	 
 }
 else
 {
	oDiv.style.display='none';
	
 }
}

function closeall()
{
	for (var i = 0; i<=100; i++) 
 	{
  		a = document.getElementById('cat'+i);
  	 if (a) 
  	 {
    		a.style.display='none';
     }
	}
}

function showWindow(id,r)
{
	window.open('/r'+r+'/'+id+'/','','width=300,height=200,left=200,top=200,status=0,scrollbars=0,resizable=0,menubar=0,location=0,toolbar=0')
}

function checkForm(formObj)
{
	if(formObj.title.value == '')
	{
		alert("Please enter a proper title")
		return false;
	}
	else if(formObj.File.value == '')
	{
		alert("Please select a file first.")
		return false;
	}	
	else
	{
		return true;
 	}
}