function popup_map() {
	map_window = window.open("map.php","Map","menubar=no,toolbar=no,scrollbars=0,statusbar=no,width=640,height=748,left=0,top=0,titlebar=no");
	map_window.focus();
}

function popup_news(file) {
	map_window = window.open(""+file,"News","menubar=no,toolbar=no,scrollbars=0,statusbar=no,width=640,height=748,left=0,top=0,titlebar=no");
	map_window.focus();
}

function popup_contact() {
	contact_window = window.open("contact.php","Contact","menubar=no,toolbar=no,scrollbars=0,statusbar=no,width=640,height=406,left=0,top=0,titlebar=no");
	contact_window.focus();
}

function popup_exchanges() {
	exchanges_window = window.open("exchanges_popup.php","Exchanges","menubar=no,toolbar=no,scrollbars=1,statusbar=no,width=658,height=548,left=0,top=0,titlebar=no");
	exchanges_window.focus();
}
function popup_clip(file) {
	clip_window = window.open("clipvideo.php?video="+file,"Clip","menubar=no,toolbar=no,scrollbars=0,statusbar=no,width=352,height=288,left=0,top=0,titlebar=no");
	clip_window.focus();
}

function openImageWindow(imageSrc,imageTitle) {
var _PAGE="";
var _CONTENT="";

_CONTENT="";
_CONTENT+="<HTML>\n";
_CONTENT+="<head>\n";
_CONTENT+="<title>"+imageTitle+"</title>\n";
_CONTENT+="<"+"SCRIPT>\n";
_CONTENT+="function specialInit()\n";
_CONTENT+="{\n";
_CONTENT+="if (document.all || document.layers)\n";
_CONTENT+="window.resizeTo(document.images[0].width + 29,document.images[0].height + 50);\n";
_CONTENT+="}\n";
_CONTENT+="</"+"SCRIPT>\n";
_CONTENT+="</head>\n";
_CONTENT+="<BODY topmargin='0' marginwidth='0' marginheight='0' style='margin:0px;margin-left:0px;' onLoad='specialInit();'>\n";
_CONTENT+="<"+"SCRIPT>\n";
_CONTENT+="document.write('<center>');\n";
//_CONTENT+="document.write('<b><font color=\\'#0066CC\\'>');\n";
//_CONTENT+="document.write('<span>&nbsp;');\n";
//_CONTENT+="document.write('"+imageTitle+"' +' &nbsp;</span></font></b>');\n";
_CONTENT+="document.write('<IMG SRC=\\'"+imageSrc+"\\'>');\n";
_CONTENT+="document.write('');";
_CONTENT+="document.write('</center>')";
_CONTENT+="</"+"SCRIPT>\n";
_CONTENT+="</BODY>\n";
_CONTENT+="</HTML>\n";

  	var _parms = 'directories=no,location=no,menubar=no,scrollbars=1,status=no,toolbar=no,statusbar=no,resizable=yes,left=0,top=0';
 	var _windowName = "";
    myWindowHandle=window.open("",_windowName,_parms);
    myWindowHandle.document.open();
    myWindowHandle.document.write(_CONTENT);
    myWindowHandle.document.close();
  	myWindowHandle.focus();
}

function popImage(imageURL,imageTitle){
	PositionX = 0;
	PositionY = 0;
	defaultWidth  = 0;
	defaultHeight = 0;
	
	var AutoClose = false;
	var imgWin = window.open('','_blank','menubar=no,toolbar=no,statusbar=no,location=0,titlebar=no,scrollbars=1,resizable=1,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);
	if( !imgWin ) { return true; } //popup blockers should not cause errors
	imgWin.document.write('<html><head><title>'+imageTitle+'<\/title><script type="text\/javascript">\n'+
		'function resizeWinTo() {\n'+
		'if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; }'+
		'var oH = document.images[0].height, oW = document.images[0].width;\n'+
		'if( !oH || window.doneAlready ) { return; }\n'+ //in case images are disabled
		'window.doneAlready = true;\n'+ //for Safari and Opera
		'var x = window; x.resizeTo( oW + 200, oH + 200 );\n'+
		'var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;\n'+
		'if( x.innerWidth ) { myW = x.innerWidth-19; myH = x.innerHeight; }\n'+
		'else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }\n'+
		'else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }\n'+
		'if( window.opera && !document.childNodes ) { myW += 16; }\n'+
		'var max_height = oH + ( (oH + 200 ) - myH);\n'+
		'if(max_height>(document.body.clientHeight + 200)) max_height = document.body.clientHeight+10;\n'+
		'x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = max_height-20);\n'+
		'var scW = screen.availWidth ? screen.availWidth : screen.width;\n'+
		'var scH = screen.availHeight ? screen.availHeight : screen.height;\n'+
		'if( !window.opera ) { x.moveTo(0,0); }\n'+
		'}\n'+
		'<\/script>'+
		'<\/head><body onload="resizeWinTo();"'+(AutoClose?' onblur="//self.close();"':'')+'>'+
		(document.layers?('<layer left="0" top="0">'):('<div style="position:absolute;left:0px;top:0px;display:table;">'))+
		'<img src='+imageURL+' alt="Loading image ..." title="" onload="resizeWinTo();">'+
		(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');
	imgWin.document.close();
	if( imgWin.focus ) { imgWin.focus(); }
	return false;
}

function popImage2(imageURL,imageTitle,center_text,right_text){
	PositionX = 0;
	PositionY = 0;
	defaultWidth  = 0;
	defaultHeight = 0;
	
	var AutoClose = true;
	var imgWin = window.open('','_blank','menubar=no,toolbar=no,statusbar=no,location=0,titlebar=no,scrollbars=1,resizable=0,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);
	if( !imgWin ) { return true; } //popup blockers should not cause errors
	imgWin.document.write('<html><head><title>'+imageTitle+'<\/title><script type="text\/javascript">\n'+
		'function resizeWinTo() {\n'+
		'if( !document.images.length ) { document.images[1] = document.layers[0].images[1]; }'+
		'var oH = document.images[1].height, oW = document.images[1].width;\n'+
		'if( !oH || window.doneAlready ) { return; }\n'+ //in case images are disabled
		'window.doneAlready = true;\n'+ //for Safari and Opera
		'var x = window; x.resizeTo( oW + 200, oH + 200 - 64);\n'+
		'var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;\n'+
		'if( x.innerWidth ) { myW = x.innerWidth-19; myH = x.innerHeight; }\n'+
		'else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }\n'+
		'else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }\n'+
		'if( window.opera && !document.childNodes ) { myW += 16; }\n'+
		'var max_height = oH + ( (oH + 200 ) - myH);\n'+
		'if(max_height>document.body.clientWidth) max_height = document.body.clientWidth-8;\n'+
		'x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = max_height);\n'+
		'var scW = screen.availWidth ? screen.availWidth : screen.width;\n'+
		'var scH = screen.availHeight ? screen.availHeight : screen.height;\n'+
		'if( !window.opera ) { x.moveTo(0,0); }\n'+
		'}\n'+
		'<\/script>'+
		'<\/head><body onload="resizeWinTo();"'+(AutoClose?' onblur="//self.close();"':'')+'>'+
		(document.layers?('<layer left="0" top="0">'):('<div style="position:absolute;left:0px;top:0px;display:table;text-align:center;">'))+
		'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="49%" align="right" style="font-family:Tahoma;font-size:12px;color:#df272f;">&#8226;</td><td align="center" nowrap="nowrap" width="2%"><p style="font-family:Arial;font-size:12px;font-weight:bold;color:#df272f;margin-top:10px;margin-bottom:9px;text-transform:uppercase;">&nbsp;'+center_text+'&nbsp;</p></td><td width="49%" style="font-family:Tahoma;font-size:12px;color:#df272f;">&#8226;</td></tr></table><h1 style="margin:0px;width:100%;height:30px;background-image:url(../images/popup_bg.gif);background-repeat:repeat-x;text-align:right;"><img src="../images/popup_photo.gif" border="0" align="right"><p style="padding-top:10px;font-family:Arial;font-size:11px;color:#ffffff;">'+right_text+'</p></h1><img src='+imageURL+' alt="Loading image ..." title="" onload="resizeWinTo();">'+
		(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');
	imgWin.document.close();
	if( imgWin.focus ) { imgWin.focus(); }
	return false;
}

function popImage3(imageURL,imageTitle) {
PositionX = 0;
PositionY = 0;
defaultWidth  = 1;
defaultHeight = 1;
var AutoClose = false;
var closeTime =10000;

var closeCode = ";setTimeout('self.close()',"+closeTime+")";
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=1,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='menubar=no,toolbar=no,statusbar=no,location=0,titlebar=no,scrollbars=1,resizable=0,width=1,height=1,left='+PositionX+',top='+PositionY;

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(1,1);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(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('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()'+closeCode+'">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()'+closeCode+'" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}
function popImage4(imageURL,imageTitle,center_text,right_text){
	PositionX = 0;
	PositionY = 0;
	defaultWidth  = 0;
	defaultHeight = 0;
	
	var AutoClose = true;
	var imgWin = window.open('','_blank','menubar=no,toolbar=no,statusbar=no,location=0,titlebar=no,scrollbars=1,resizable=0,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);
	if( !imgWin ) { return true; } //popup blockers should not cause errors
	imgWin.document.write('<html><head><title>'+imageTitle+'<\/title><script type="text\/javascript">\n'+
		'function resizeWinTo() {\n'+
		'if( !document.images.length ) { document.images[1] = document.layers[0].images[1]; }'+
		'var oH = document.images[1].height, oW = document.images[1].width;\n'+
		'if( !oH || window.doneAlready ) { return; }\n'+ //in case images are disabled
		'window.doneAlready = true;\n'+ //for Safari and Opera
		'var x = window; x.resizeTo( oW + 200, oH + 200 - 64);\n'+
		'var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;\n'+
		'if( x.innerWidth ) { myW = x.innerWidth-19; myH = x.innerHeight; }\n'+
		'else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }\n'+
		'else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }\n'+
		'if( window.opera && !document.childNodes ) { myW += 16; }\n'+
		'var max_height = oH + ( (oH + 200 ) - myH);\n'+
		'if(max_height>document.body.clientWidth) max_height = document.body.clientWidth-8;\n'+
		'x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = max_height);\n'+
		'var scW = screen.availWidth ? screen.availWidth : screen.width;\n'+
		'var scH = screen.availHeight ? screen.availHeight : screen.height;\n'+
		'if( !window.opera ) { x.moveTo(0,0); }\n'+
		'}\n'+
		'<\/script>'+
		'<\/head><body onload="resizeWinTo();"'+(AutoClose?' onblur="//self.close();"':'')+'>'+
		(document.layers?('<layer left="0" top="0">'):('<div style="position:absolute;left:0px;top:0px;display:table;text-align:center;">'))+
		'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="49%" align="right" style="font-family:Tahoma;font-size:12px;color:#df272f;">&#8226;</td><td align="center" nowrap="nowrap" width="2%"><p style="font-family:Arial;font-size:12px;font-weight:bold;color:#df272f;margin-top:10px;margin-bottom:9px;text-transform:uppercase;">&nbsp;'+center_text+'&nbsp;</p></td><td width="49%" style="font-family:Tahoma;font-size:12px;color:#df272f;">&#8226;</td></tr></table><h1 style="margin:0px;width:100%;height:30px;background-image:url(../images/popup_bg.gif);background-repeat:repeat-x;text-align:right;"><img src="../images/popup_photo1.gif" border="0" align="right"><p style="padding-top:10px;font-family:Arial;font-size:11px;color:#ffffff;">'+right_text+'</p></h1><img src='+imageURL+' alt="Loading image ..." title="" onload="resizeWinTo();">'+
		(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');
	imgWin.document.close();
	if( imgWin.focus ) { imgWin.focus(); }
	return false;
}