//Auto centering popup
function getRefToDivMod( divID, oDoc ) {
	if( !oDoc ) { oDoc = document; }
	if( document.layers ) {
		if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
			for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
				y = getRefToDivNest(divID,oDoc.layers[x].document); }
			return y; } }
	if( document.getElementById ) { return oDoc.getElementById(divID); }
	if( document.all ) { return oDoc.all[divID]; }
	return document[divID];
}

function openPerfectPopup(oW,oContent) {
	var x = window.open('','windowName','width=570,height=420,resizable=1,status=1');
	if( !x ) { return true; }
	x.document.open();
	x.document.write('<html><head><title>Morfes Kallonis<\/title><script type="text/javascript"language="javascript1.2" src="global.js"><\/script><\/head><body bgcolor="#F0EEC5">'+
	  (document.layers?('<layer left="0" top="0" width="'+oW+'" id="myID">')
	    :('<div style="position:absolute;left:0px;top:0px;display:table;width:'+oW+'px;" '+
	    'id="myID">'))+
	  '<img style="border:3px double #96926b;" src=graphics/large/'+oContent+'.jpg>'+(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');
	if( x.focus ) { x.focus(); }
	return false;
}



//Encrypted Password
function submitentry(){
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()
passcode = 1
usercode = 1
for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
if(usercode==1505676823560&&passcode==14810490898040476)
{
window.location=password+".html"}
else{
alert("Login incorrect!\n\n\Contact info@morfes-kallonis.gr for access to this section.")}
}

//Disable right mouse click
var message="   Copyright 2005 Morfes Kallonis   ";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// --> 


