


//<script type="text/javascript" src="my.js"></script>



var message="您好, 歡迎光臨!!";
var is_show_message=0; //0 or 1

function clickIE4()
{
	if (event.button==2)
	{
		if( is_show_message==1 )
		alert(message);
		return false;
	}
}

function clickNS4(e)
{
	if (document.layers||document.getElementById&&!document.all)
	{
		if (e.which==2||e.which==3)
		{
			if( is_show_message==1 )
			alert(message);
			return false;
		}
	}
}


function disableselect(e){
return false
}

function reEnable(){
return true
}


//if IE4+
document.onselectstart=new Function ("return false")

function myclear(){
    Source=document.body.firstChild.data;
    document.open();
    document.close();
    document.title="看不到源代碼";
    document.body.innerHTML=Source;
}
//document.body.onload=myclear

window.onbeforeunload = function()
{
    //if((window.event.clientX<0) || (window.event.clientY<0))
	if((window.event.clientX>900) && (window.event.clientY<0))
	{ 
        window.external.AddFavorite('http://avhome.tv','AVHOME.TV AV佳人～成人影音播放下載')
		//window.event.returnValue ="您確定要關閉視窗！？";
		//if(window.event.reason ==false)
		//{
		//	window.event.cancelBubble =true;
		//}
    }
}




//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

if( is_show_message==1 )
{
	document.oncontextmenu=new Function("alert(message);return false")
}
else
{
	document.oncontextmenu=new Function("return false")
}



