
var clickmessage="Right click disabled on images!";
var surl=document.location.href;

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
//alert("Please enter email id");
//document.getElementById('email').style.display='block';
if(event.srcElement.id=='main_map')
	{
centerPopup();
loadPopup();
	}
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
//document.getElementById('email').style.display='block';
centerPopup();
loadPopup();
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
//document.getElementById('email').style.display='block';

if(e.target.id=='main_map')
	{
centerPopup();
loadPopup();
	}
//document.getElementById('popupContact').style.display='block';
return false
}
}

}

function associateimages(){
for(i=0;i<document.images.length;i++)
//document.images[i].onmousedown=disableclick;
document.getElementById('main_map').onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()



var testresults
function checkemail(){
var str=document.validation.emailcheck.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
{
testresults=true;
//alert(document.getElementById('main_map').value);
save(map_location);
}
else{
alert("Please input a valid email address!")
testresults=false
}
//return (testresults)
return false;
}

function checkbae(){
if (document.layers||document.getElementById||document.all)
return checkemail()

else
return true
}
function saveImage(imagepath)
{
	var fileName = 'http://www.mapsofworld.com/save_image.php?id='+imagepath;
	window.location.href = fileName;
}


var isNS = (navigator.appName == "Netscape") ? 1 : 0;
	if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
	function mischandler(){
	return false;
	}
	function mousehandler(e){
	var myevent = (isNS) ? e : event;
	var eventbutton = (isNS) ? myevent.which : myevent.button;
	if((eventbutton==2)||(eventbutton==3)) return false;
	}
	//document.oncontextmenu = mischandler;
