if (parent.frames.length > 0) {
   parent.location.href = self.document.location
}

function showDHTML(e, caption, description, clicks) {
	document.getElementById("show_descr").style.visibility = "visible";
	document.getElementById("show_descr").style.left = (e.clientX + 10 + getBody().scrollLeft) + "px";
	document.getElementById("show_descr").style.top = (e.clientY + 10 + getBody().scrollTop) + "px";
	document.getElementById("show_title").innerHTML = unescape(caption);
	document.getElementById("show_about").innerHTML = unescape(description);
	//document.getElementById("show_views").innerHTML = clicks;
}

function hideDHTML() {
	document.getElementById("show_descr").style.left = "0px";
	document.getElementById("show_descr").style.top = "0px";
	document.getElementById("show_descr").style.visibility = "hidden";
}

function getBody() {
	if (document.compatMode && document.compatMode!="BackCompat") {
		return document.documentElement;
	} else {
		return document.body;
	}
}

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=550,left = 565,top = 412');");
}

function newPage(url) {
	window.location = url;
}

function addFavoriteSite() {
	if (navigator.appName != 'Microsoft Internet Explorer') {
		window.sidebar.addPanel("Mojoflix.com - Funny, Sexy, Crazy Videos", "http://www.mojoflix.com", "");
	} else {
		window.external.AddFavorite("http://www.mojoflix.com", "Mojoflix.com!");
	}
}

function familyFilter(which) {
	if (which == 'Off') {
		var response = confirm("Due to inappropriate content, you must be at least 18 years old of age to turn off the family filter. Do you wish to continue?");

		if (response) {
			window.location = "/Filter/Off"
		}
	} else {
		window.location = "/Filter/On"
	}
}