
function setHome()
{
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage(window.location.href);
}

function loadPage(link){
	location.href=link;
}
function changePic(img,obj){
	obj.src	=	img;
}


function showDv(surl,dv){
	//alert(surl);
	//alert(dv);
	ajax.callPage(surl,dv);
}
function search(div1,path,color){
	var out;
	
	out	=	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="300" height="30" id="group" align="middle">';
	out	=	out+ '<param name="allowScriptAccess" value="sameDomain" />';
	out	=	out+ '<param name="allowFullScreen" value="false" />';
	out	=	out+ '<param name="movie" value="'+path+'images/reading.swf" />';
	out	=	out+ '<param name="quality" value="high" />';
	out	=	out+ '<param name="bgcolor" value="#'+color+'" />';	
	out	=	out+ '<embed src="'+path+'images/reading.swf" quality="high" bgcolor="#'+color+'" width="300" height="30" name="group" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	out	=	out+ '</object>';
	document.getElementById(div1).innerHTML	=	out;
}
function showNill(dv){	
	document.getElementById(dv).innerHTML	=	'';
}
function saveBlog(link){
	var title;
	var des;
	var mess='';
	title	=	blogTForm.TITLE.value;
	des	=	blogTForm.DES.value;

	if (title=='')
	{
		mess	=	'Title\n';	
	}
	else{
		link	=	link	+ '&TITLE='+title;
	}
	if (des=='')
	{
		mess	=	mess+'Body\n';	
	}
	else{
		link	=	link	+ '&DES='+des;
	}
	if (mess=='')
	{
		showNill('tbody');
		showDv(link,showIbody);
	}
	else {
		alert('Please correct following field(s)\n'+mess);
	}

}

function openPicture(link){
	window.open(link,'photos','left=20,top=20,width=700,height=330,location=0,toolbar=0,resizable=0');
}



function showMenu(response){	
	document.getElementById('menu').innerHTML	=	response;
}
function showBody(response){	
	document.getElementById('body').innerHTML	=	response;
}
function showTbody(response){	
	document.getElementById('tbody').innerHTML	=	response;
}
function showIbody(response){
	document.getElementById('ibody').innerHTML	=	response;
}