function bookmark(){
	if (document.all) 
		window.external.addFavorite(location.href, document.title);
	else
		alert('Press Ctrl/D to Bookmark this Page');
}
function mail(url, w, h){
	var popup = window.open(url,'','ScreenX=350,ScreenY=250,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + w + ',height=' + h + "'");
}
function getObject(iD){
	var obj;
	if(document.getElementById) obj=document.getElementById(iD);
	else if(document.all) obj=document.all[iD];
	else if(document.layers) obj=document.layers[iD];
	return obj;
}
function showObject(iD){
	var obj=getObject(iD);
	objStyle=(obj && obj.style)||obj;
	objStyle.visibility="visible";
}
function hideObject(iD){
	var obj=getObject(iD);
	objStyle=(obj && obj.style)||obj;
	objStyle.visibility="hidden";
}
function ftv_update(id){
	var url="/common/ftv_update.php?id="+id;
	if(document.all) document.all.page.src=url;
	else if (document.getElementById) document.getElementById('page').src=url;	
}
function ws(s){
	w.status=s;return true;
}

var faded=false;
function OnLoad(){
	Rico.Corner.round('frame');
	roundItems();
}
function roundItems(){
	boxes = document.getElementsByClassName('itemFrame');
	for (i=0;i<boxes.length;i++){
    	Rico.Corner.round(boxes[i], {bgColor:Rico.Corner._background($('frame')) });
	}
}

function logoEnter(id){
	if(!faded){
		faded=true;
		new Rico.Effect.FadeTo(id, .6, // 20% opacity 
									50, // 500ms (1/2 second) 
									1 // 10 steps 
									 );
	}
}
function logoLeave(id){
	faded=false;
	new Rico.Effect.FadeTo( id, 1, 50, 1 );
}
function setcookie(name,value,duration){
	cookiestring=name+"="+escape(value)+";EXPIRES="+getexpirydate(duration);
	document.cookie=cookiestring;
}
function getcookie(cookiename) {
	var cookiestring=""+document.cookie;
 	var index1=cookiestring.indexOf(cookiename);
 	if (index1==-1 || cookiename=="") 
 		return ""; 
 	var index2=cookiestring.indexOf(';',index1);
 	if (index2==-1) 
 		index2=cookiestring.length; 
 	return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}
function getexpirydate(nodays){
	var UTCstring;
	Today = new Date();
	nomilli=Date.parse(Today);
	Today.setTime(nomilli+nodays*24*60*60*1000);
	UTCstring = Today.toUTCString();
	return UTCstring;
}

