//if (top != self) top.location=self.document.location;

function addbookmark()
{ url="http://www.roozvideo.com/"
title="Rooz Video - Online Iranian Videos"
if (document.all) { window.external.AddFavorite(url, title);} else if (window.sidebar) { window.sidebar.addPanel(title, url, "");}
}

//////////////////////////////////////////////////////
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;
};