/* create by Paramonov Anton - 02, 2004 */
// update by Paramonov - 04, 2009


	var nn = (document.getElementById && navigator.appName == "Netscape") ? true : false;
   	var ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
	var supportedPNG = /MSIE (5\.5)/.test(navigator.userAgent) && navigator.platform == "Win32";

	function loader(){
		if(!supportedPNG) 
			document.getElementById('TDtitle').src = '../images/trance.gif';
	}
	
	var hw;
	var ww;
	
	function viewFoto( name , w , h ){
		foto = "foto/" + name + ".jpg";
		if (nn || ie4)
               posCode = (nn) ? ",screenX=0,screenY=0" : ",left=0,top=0";
          	else
           		posCode = "";									
		var popup = window.open( 'viewer.htm' , '_blank', 'width='+w+',height='+h+',fullscreen=0,resizeable=no,scrollbars=no,menubar=no,status=no,toolbar=no,location=no' + posCode, replace=true);
		
		Text = "<html><head><title>TRANCE DANCE</title></head>";
		Text += "<body bgcolor=black marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>";
		Text += "<img src='"+foto+"' width='"+w+"' height='"+h+"' border='0'>";
		Text += "</body></html>";
		
		popup.document.write(Text);
	}
	
	function viewFoto2( name , w , h ){
		foto = "foto/" + name;
		if (nn || ie4)
               posCode = (nn) ? ",screenX=0,screenY=0" : ",left=0,top=0";
          	else
           		posCode = "";									
		var popup = window.open( 'foto/viewer.htm' , '_blank', 'width='+w+',height='+h+',fullscreen=0,resizeable=no,scrollbars=no,menubar=no,status=no,toolbar=no,location=no' + posCode, replace=true);
		
		var Text = "<html><head><title>TRANCE DANCE</title></head>";
		Text += "<body bgcolor=black marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>";
		Text += "<img src='"+foto+"' width='"+w+"' height='"+h+"' border='0'>";
		Text += "</body></html>";
		
		popup.document.write(Text);
		
		return;
	}

	function viewPoster( name , w , h ){
		foto = "foto/" + name + ".jpg";
		if (nn || ie4)
               posCode = (nn) ? ",screenX=0,screenY=0" : ",left=0,top=0";
          	else
           		posCode = "";									
		getSizeWindow();
		var popup = window.open( 'viewer.htm' , '_blank', 'width='+ww+',height='+hw+',fullscreen=0,resizeable=yes,scrollbars=yes,menubar=no,status=no,toolbar=no,location=no' + posCode, replace=true);
		
		var Text = "<html><head><title>TRANCE DANCE</title></head>";
		Text += "<body bgcolor=black marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>";
		Text += "<img src='"+foto+"' width='"+w+"' height='"+h+"' border='0'>";
		Text += "</body></html>";
		
		popup.document.write(Text);
	}
	
	function viewPoster2( name , w , h ){
		foto = "foto/" + name;
		if (nn || ie4)
               posCode = (nn) ? ",screenX=0,screenY=0" : ",left=0,top=0";
          	else
           		posCode = "";									
		getSizeWindow();
		var popup = window.open( 'viewer.htm' , '_blank', 'width='+ww+',height='+hw+',fullscreen=0,resizeable=yes,scrollbars=yes,menubar=no,status=no,toolbar=no,location=no' + posCode, replace=true);
		
		Text = "<html><head><title>TRANCE DANCE</title></head>";
		Text += "<body bgcolor=black marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>";
		Text += "<img src='"+foto+"' width='"+w+"' height='"+h+"' border='0'>";
		Text += "</body></html>";
		
		popup.document.write(Text);
	}
	
	function getSizeWindow(){		
		if(screen.availWidth&&screen.availHeight)
		{
			ww = screen.availWidth - 15;
			hw = screen.availHeight - 30;
		} else 
		{
			hw = 600;
			ww = 800;
		}
	}

	
	function clubList(mode){
		switch(mode){
			case 0 : 
				// mini list
				document.getElementById("clubFullList").style.display = "none";
				document.getElementById("miniL").style.display = "none";
				document.getElementById("fullL").style.display = "block";
				document.getElementById("clubList").style.display = "block";
				break;
			case 1 : 					
				//	full list
				document.getElementById("fullL").style.display = "none";
				document.getElementById("clubList").style.display = "none";
				document.getElementById("clubFullList").style.display = "block";
				document.getElementById("miniL").style.display = "block";
				break;
		}
		location.href = "#clubs";
	}		
	
	function photoList(mode){
		var list = document.getElementById("fullPhoto");
		var urlF = document.getElementById("linkFull");
		if(mode == 1) {
			list.style.display = "block";
			urlF.style.display = "none";
		} else {
			list.style.display = "none";
			urlF.style.display = "block";
		}
		location.href = "#firstPhoto";
	}
	
	function viewMap(){
		if (nn || ie4)
               posCode = (nn) ? ",screenX=0,screenY=0" : ",left=0,top=0";
          	else
           		posCode = "";									
		getSizeWindow();
		var popup = window.open( 'map.htm' , '_blank', 'width='+ww+',height='+hw+',fullscreen=0,resizeable=yes,scrollbars=yes,menubar=no,status=no,toolbar=no,location=no' + posCode, replace=true);
	}
	
	function tooglePhoto(id) {
		var name = "photopartner";
		var elem = document.getElementById(name + id);
		elem.style.display = (elem.style.display == "none") ? "block" : "none";
	}
	
		