function dohideicon()
{
document.getElementById("blogdiv").style.visibility="hidden";
}


function popup(url) 
{
 var width  = 700;
 var height = 500;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=no';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false;
}
function display_tab(arg)
{

//if(arg==null || arg=='')arg=getCookie('twblog'); else setCookie('twblog',arg,60);

document.getElementById("recentpost").style.display="none";
document.getElementById("categories").style.display="none";
document.getElementById("archives").style.display="none";
document.getElementById("a_recentposts").className="";
document.getElementById("a_categories").className="";
document.getElementById("a_archives").className="";
//checking cookie starts here



  //checking cookie ends here

switch (arg) {
case "recentposts": 
document.getElementById("recentpost").style.display="block";
document.getElementById("a_recentposts").className="selected";
break;
case "archives": 
document.getElementById("archives").style.display="block";
document.getElementById("a_archives").className="selected";
break;
default: 
document.getElementById("categories").style.display="block";
document.getElementById("a_categories").className="selected";
}
}

//Cookies for categories starts here
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

//Cookies for categories ends here

function search_loading()
{
document.searchform.submit();
document.getElementById('search_btn').innerHTML='';
document.getElementById('img_loading').style.display='block';
}