var ErrMsg = "Right click is disabled!";

function disableRightClick(btnClick)
{
	if (navigator.appName == "Netscape" && btnClick.which == 3) // check for netscape and right click
	{
		alert(ErrMsg);
		return false;
	}
	else if (navigator.appName =="Microsoft Internet Explorer" && event.button == 2) // for IE and Right Click
	{
		alert(ErrMsg);
		return false;
	}
}

function timedRedirect(){
	window.location.reload();
}

function resizeChat(id){
	if (self.innerWidth){
		frameWidth = self.innerWidth;
		frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth){
		frameWidth = document.documentElement.clientWidth;
		frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body){
		frameWidth = document.body.clientWidth;
		frameHeight = document.body.clientHeight;
	}
	document.getElementById(id).width = frameWidth;
	document.getElementById(id).height = frameHeight;
}

function myrefresh(param){
	if (document.getElementById("MediaPlayer"))
		document.getElementById("MediaPlayer").stop();

	if (param == "-1"){
		alert("You have not enough coins");
		window.open('abo.asp','_top');
	}
	else if (param == "0"){
		alert("Girl is offline");
		top.close();
	}
	else if (param == "1"){
		alert("Girl is in freechat");
		top.location.reload();
	}
	else if (param == "2"){
		window.open('hardcore_wait.asp?nocontinue=1','_top');
	}
}

function showcoins(coins){
	if (top.statusfrm != null)
		if (top.statusfrm.document.getElementById("coins") != null)
			top.statusfrm.document.getElementById("coins").innerHTML = coins;
	
	if (document.getElementById("coins") != null)
		document.getElementById("coins").innerHTML = coins;

	if (coins.charAt(0) == 'b')
		return;
	else {
		if (this.updatecoins != null)
			updatecoins(coins);
		else {
			if ((top.opener != null)&&(top.opener.top != null)){
				element = top.opener.top;
				if (top.opener.top.menu_main == null)
					element = element.mainframe;
				if ((element != null) && (element.menu_main != null)){
					if (element.menu_main.document.getElementById("coins") != null) {
						element.menu_main.document.getElementById("coins").value = coins;
					}
				}
			}
		}
	}
}

function startcam(param)
{
	param = param.replace('http://www.px24.com/loader.asp', 'http://www.px24.com/flashclient/load_client.php');
	param += "&disableFullScreen=1";
	if (document.getElementById("pxchat"))
	{
		document.getElementById("pxchat").src = param;
	}
	else
	{
		document.getElementById("MediaPlayer").fileName = param;
	}
}

function mycount(coins){
	if (document.getElementById("mycount") != null)
		document.getElementById("mycount").innerHTML = coins;
}
function myalert(coins){
}
function showurl(param){
}

