var active=false;

function contactWindow(lang){
	var width=388;
	var height=462;
	var pos=windowPosition(width,height);
	window.open("contact.php?action=contact&amp;lang="+lang,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,fullscreen=no,channelmode=no,width='+width+',height='+height+',top='+pos[1]+',left='+pos[0]);
	/*
	if(!active){
		active=true;
		contactWin=new Window('contact', {
									title: "", 
									width:388,
									height:462,
									url: "contact.php?action=contact&amp;lang="+lang, 
									resizable:false,
									closable:false,
									maximizable:false,
									minimizable:false,
									draggable:false,
									showEffectOptions: {duration:9.0},
									hideEffectOptions: {duration:9.0},
									onClose:function(win){
										active=false;	
										//closeContactWindow();
										}
								  }
						);
		Windows.overlayShowEffectOptions = {duration: 9.0};
		Windows.overlayHideEffectOptions = {duration: 9.0};
		contactWin.setDestroyOnClose();
		
		contactWin.showCenter();
		*/
		/*
		}
	*/
	}
/*
function closeContactWindow(){
	active=false;
	Windows.focusedWindow.close();
	}
*/
function windowPosition(width,height){
	var pos=new Array(0,0);
	if(width<screen.width){
		pos[0]=parseInt((screen.width-width)/2);
		}
	if(height<screen.height){
		pos[1]=parseInt((screen.height-height)/2);
		}
	return pos;
	}

function printTraveler(){
	html='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Nowakadventure</title><link type="text/css" rel="stylesheet" href="css/style.css"></head>';
	html+='<body onload="javascript:window.print();" style="margin:0;padding:5px;border:0"><div id="content">';
	html+=document.getElementById('traveler').innerHTML;
	html+='</div></body></html>';
	errorPopUp=window.open('about:blank','','toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,fullscreen=no,channelmode=no');
	with(errorPopUp.document){
		open();
		write(html);
		close();
		}
	}
	
function devil()
{
	document.getElementById('dust').value = '1';
	document.getElementById('contact').submit();
}
