//if (top != self) top.location=self.document.location;

function addbookmark()
{ url="http://www.hiphopup.com/"
title="Hip Hop Up"
if (document.all) { window.external.AddFavorite(url, title);} else if (window.sidebar) { window.sidebar.addPanel(title, url, "");}
}

function HomePageVideoList(page) { 
	$('HomeVideoList').innerHTML = "<div align=center style='margin:250px 250px 300px 250px;'><img src='/images/ajax-loader.gif' border=0 /></div>";
	new Ajax.Request("/includes/ajax_videolist.php", { method: 'post',  postBody: "page="+page,  onComplete: HomePageVideoListResponse }); 
}
function HomePageVideoListResponse(req) { $('HomeVideoList').innerHTML =  req.responseText; }

//////////////////////////////////////////////////////
function CleanMe(id) { $('#'+id).val(""); }
function ClickMore() { $('more_word').style.display='none'; $('desc_more').style.display='inline'; }
function ClickLess() { $('more_word').style.display='inline'; $('desc_more').style.display='none'; }
function subit() { document.getElementById("submit").disabled = true; }
//////////////////////////////////////////////////////
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 createCookie(c_name,value,expiredays){
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function htmlspecialchars(p_string) {
	p_string = p_string.replace(/&/g, '&amp;');
	return p_string;
};
