// JavaScript Document

//--------- open hiden --------

function showBlock(el){
	if (document.getElementById){
	    var e = document.getElementById(el)
    	if (e.style.display == "block"){ e.style.display = "none" }
    	else { e.style.display = "block" }
	    return false;
    }
}


//--------- open hiden --------

function SwitchMenu(obj){
if(document.getElementById(obj).style.display == "block")
	document.getElementById(obj).style.display = "none";
	else
	document.getElementById(obj).style.display = "block";
}


//--------- print--------

function printthis()
{
if (window.print != null) 
{ window.print(); }
 else
 { alert('Unfortunately, your browser does not support this shortcut.  Please select Print from the File menu.'); }
}


//  --------------pop up -----------

var u="http://www.asianventure.com/cgi-bin/tellfriend.cgi";
u += '?url=' + escape(document.location);

function tellfriend(){
window.open(u,"tellafriend","status=no,toolbar=no,location=no,directories=no,copyhistory=no,menu=no, resizable=no, scrollbars=yes, top=40, left=20, width=350, height=390");
}

//   end pop up


//--------- right click--------

function disableselect(e){
if (e.target.className.toLowerCase()=='field'||e.target.parentNode.className.toLowerCase()=='field')
return;
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined"){
document.onselectstart=new Function ("return false")
window.onload=noSelect;
}
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

function noSelect(){
tags=document.all
for (j = 0; j < tags.length; j++)
if (tags[j].className.toLowerCase()=='field'){
tags[j].onselectstart=function(){
document.onselectstart=new Function ('return true')
}
if (tags[j].onmouseup!==null){
var mUp=tags[j].onmouseup.toString()
mUp='document.onselectstart=new Function (\'return false\');\n'+mUp.substr(mUp.indexOf('{')+2,mUp.lastIndexOf('}')-mUp.indexOf('{')-3);
tags[j].onmouseup=new Function(mUp);
}
else{
tags[j].onmouseup=function(){
document.onselectstart=new Function ('return false')
}
}
if (tags[j].onmouseout!==null){
var mUp=tags[j].onmouseup.toString()
mUp='document.onselectstart=new Function (\'return false\');\n'+mUp.substr(mUp.indexOf('{')+2,mUp.lastIndexOf('}')-mUp.indexOf('{')-3);
tags[j].onmouseout=new Function(mUp);
}
else{
tags[j].onmouseout=function(){
document.onselectstart=new Function ('return false')
}
}
}
}

function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")


//-------image begin------------- 

// Set the horizontal and vertical position for the popup

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');

writeln('<sc'+'ript>');
writeln('var isNN,isIE;');
writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE){');
writeln('window.resizeTo(300,300);');
writeln('width=300-(document.body.clientWidth-document.images[0].width);');
writeln('height=300-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');
writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');
writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('function clickIE() {if (document.all) {(message);return false;}}');
writeln('function clickNS(e) {if (document.layers||(document.getElementById&&!document.all))');
writeln('{if (e.which==2||e.which==3) {(message);return false;}}}');
writeln('if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}');
writeln('else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}');
writeln('document.oncontextmenu=new Function("return false")');
writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}

//-------image end------------- 
