
function show(ob)
{var obj=document.getElementById(ob);obj.style.display="block";}
function hide(ob)
{var obj=document.getElementById(ob);obj.style.display="none";}
function toggle(ob)
{var obj=document.getElementById(ob);if(obj.style.display=="none"){obj.style.display="block";}else{obj.style.display="none";}}
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 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);}
var lightYellowToWhite=Array("#ffffaa","#ffff99","#ffffaa","#ffffbb","#ffffcc","#ffffdd","#ffffee","#ffffff");function fadeIn(e)
{var originalColor=e.style.backgroundColor;e.style.backgroundColor=lightYellowToWhite[0];setTimeout(function(){fade(e,0,lightYellowToWhite,originalColor);},100);}
function fade(e,index,colorTable,originalColor)
{if(index<colorTable.length){window.status=index;e.style.backgroundColor=colorTable[index];setTimeout(function(){fade(e,++index,colorTable,originalColor);},50);}else{e.style.backgroundColor=originalColor;}}
function popUp(URL){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=350,left = 262,top = 209');");}
var nw=null;function popUpKB(URL,ctrl){day=new Date();id=day.getTime();nw=window.open(URL,"nw","toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=410,height=160");nw.wn=window;}
function changePostStatus(status)
{var obj=document.getElementById('status');obj.value=status;}
function changeBirthdayViewOption(id)
{
	var benable;
	var checkIfChecked=document.getElementById('birthdayPublicViewChange').checked;
	if(checkIfChecked)
		benable = 'yes';
	else
		benable = 'no';	
	$j.ajax({
	   type: "POST",
	   url: base_url+"action/changeBirthdayView",
	   data: 'baction='+benable,
	   success: function(msg){
	     alert( msg );
	   }
	 });

}
