
function open_window11()
{
  window.open('panoramas/klatreverket-oslo/qtvr/klatreverket-oslo-qt.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window12()
{
  window.open('panoramas/klatreverket-oslo/flash/klatreverket-oslo-flash.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window13()
{
  window.open('panoramas/klatreverket-oslo/deval/klatreverket-oslo-deval.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}



function open_window21()
{
  window.open('panoramas/klettercentrum-ahlen/qtvr/klettercentrum-ahlen-qt.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window22()
{
  window.open('panoramas/klettercentrum-ahlen/flash/klettercentrum-ahlen-flash.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window23()
{
  window.open('panoramas/klettercentrum-ahlen/deval/klettercentrum-ahlen-deval.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}


function open_window31()
{
  window.open('panoramas/kletterhalle/qtvr/kletterhalle-qt.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window32()
{
  window.open('panoramas/kletterhalle/flash/kletterhalle-flash.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window33()
{
  window.open('panoramas/kletterhalle/deval/kletterhalle-deval.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}


function open_window41()
{
  window.open('panoramas/kletterturm-mockau/qtvr/kletterturm-mockau-qtvr.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window42()
{
  window.open('panoramas/kletterturm-mockau/flash/kletterturm-mockau-flash.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window43()
{
  window.open('panoramas/kletterturm-mockau/deval/kletterturm-mockau-deval.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}


function open_window51()
{
  window.open('panoramas/kolsas-klatreklubb-oslo/qtvr/kolsas-klatreklubb-qt.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window52()
{
  window.open('panoramas/kolsas-klatreklubb-oslo/flash/kolsas-klatreklubb-flash.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_window53()
{
  window.open('panoramas/kolsas-klatreklubb-oslo/deval/kolsas-klatreklubb-deval.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}








function open_windowg11()
{
  window.open('panoramas/attic-strazhitsa/qtvr/attic-strazhitsa-qt.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_windowg12()
{
  window.open('panoramas/attic-strazhitsa/flash/attic-strazhitsa-flash.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_windowg13()
{
  window.open('panoramas/attic-strazhitsa/deval/attic-strazhitsa-deval.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}



function open_windowg21()
{
  window.open('panoramas/cologne-cathedral/qtvr/cologne-cathedral-qt.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_windowg22()
{
  window.open('panoramas/cologne-cathedral/flash/cologne-cathedral-flash.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_windowg23()
{
  window.open('panoramas/cologne-cathedral/deval/cologne-cathedral-deval.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}


function open_windowg31()
{
  window.open('panoramas/deserted-building/qtvr/deserted-building-qt.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_windowg32()
{
  window.open('panoramas/deserted-building/flash/deserted-building-flash.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_windowg33()
{
  window.open('panoramas/deserted-building/deval/deserted-building-deval.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}


function open_windowg41()
{
  window.open('panoramas/steam-roller/qtvr/steam-roller-qt.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_windowg42()
{
  window.open('panoramas/steam-roller/flash/steam-roller-flash.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}

function open_windowg43()
{
  window.open('panoramas/steam-roller/deval/steam-roller-deval.html', '_blank' , 'scrollbars=no, toolbar=no,menubar=no,resizable=no,width=640,height=480');
}



function open_windowobj1()
{
  window.open('objectmovie/object/object.html', '_blank' , 'scrollbars=no, toolbar=no, menubar=no, resizable=no,width=640,height=480');
}


function open_windowobj2()
{
  window.open('objectmovie/waiter/waiter.html', '_blank' , 'scrollbars=no, toolbar=no, menubar=no, resizable=no,width=640,height=480');
}


function open_windowobj31()
{
  window.open('objectmovie/vrtools/qtvr/object-qt.html', '_blank' , 'scrollbars=no, toolbar=no, menubar=no, resizable=no,width=640,height=480');
}

function open_windowobj32()
{
  window.open('objectmovie/vrtools/flash/object-flash.html', '_blank' , 'scrollbars=no, toolbar=no, menubar=no, resizable=no,width=640,height=480');
}

function open_windowobj33()
{
  window.open('objectmovie/vrtools/deval/object-deval.html', '_blank' , 'scrollbars=no, toolbar=no, menubar=no, resizable=no,width=640,height=480');
}








function validateForm (formname,loginemail){
	var errorstring='';
	


	//Validate Profile Form
	if (fieldValid (document.regform.name.value,'',3)==false){
		errorstring=errorstring + '   - Enter Name\n';
	}

	if (fieldValid (document.regform.country.value,'',2)==false){
		errorstring=errorstring + '   - Enter your Country\n';
	}
	

	
	if (fieldValid (document.regform.email.value,'email',0)==false){
		errorstring=errorstring + '   - Enter valid E-mail adres\n';
	}

	//Contact Us
	if (formname=='contactus'){
		if (fieldValid (document.regform.comments.value,'',10)==false){
			errorstring=errorstring + '   - Enter contact Message\n';
		}
	}


		
	if (errorstring !=''){
		alert ('Please Provide the Following Information:    \n\n' + errorstring);
		return false;
	}
	return true;
}


//Validate Field
function fieldValid (fieldvalue,validatetype,requirelength){	
	var fieldvalid=true;
	if (validatetype=='email'){
		//Check for Valid e-Mail Address
		var validchars=new Array ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9','@','.','!','_','-','+','~','`','\'');
		if (fieldvalue==''){
		fieldvalid=false;
		}
		for (a = 0; a < fieldvalue.length; a++){
			var tmpval=fieldvalue.substring (a,a+1);
			aok=0;
			for (b = 0; b < validchars.length; b++){
				var tmpchk=validchars[b];
				if (tmpchk==tmpval){
					aok=1;
				}
			}
			if (aok==0){
				fieldvalid=false;
			}
		}
		var tmplocat=fieldvalue.indexOf ('@');
		var tmplocdot=fieldvalue.indexOf ('.',tmplocat);
		if (tmplocat<1 || tmplocdot<1){
		 	fieldvalid=false;	
		}
	} if (validatetype=='number'){
		//Check for Number
		var tmpnum=parseInt(fieldvalue);
		if (tmpnum=='NaN'){
			fieldvalid=false;
		}
		if (tmpnum>requirelength){
			fieldvalid=false;
		}
	}
	
	else {
		//Check for Whitespace 
		var tmpstring=crunchWhite (fieldvalue);
		if (tmpstring.length<requirelength){
			fieldvalid=false;
		}	
	}
	return fieldvalid;
}

//Return a String with No White Space
function crunchWhite (instring){
	if (instring==''){
          	return instring;
        }
        var returnstring='';
        
	// Look for Whitespace
	for (a = 0; a < instring.length; a++){
		var tmpchar = instring.substring(a, a+1);
                if (tmpchar!=' ' || tmpchar!='\t'){
                	returnstring=returnstring+tmpchar;
                }
	}
           return returnstring;
}

//Trim White Space (Off Edges of String)
function trim(instring) {
	var returnstring = instring;
	var ch = returnstring.substring(0, 1);
	while (ch == " ") { 
	   returnstring = returnstring.substring(1, returnstring.length);
	   ch = returnstring.substring(0, 1);
	}
	ch = returnstring.substring(returnstring.length-1, returnstring.length);
	while (ch == " ") {
	   returnstring = returnstring.substring(0, returnstring.length-1);
	   ch = returnstring.substring(returnstring.length-1, returnstring.length);
	}
	while (returnstring.indexOf("  ") != -1) {
	   returnstring = returnstring.substring(0, returnstring.indexOf("  ")) + returnstring.substring(returnstring.indexOf("  ")+1, returnstring.length); // Again, there are two spaces in each of the strings
	}
	return returnstring;
}