


function openslidewin(url) {
slidewin = window.open(url,"slide",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,top=0,left=0,width=830,height=700');
slidewin.focus();
}


function openimpreswin(url) {

dasda = document.URL;

trickes = "/" + "es" + "/";
trickde = "/" + "de" + "/";


if (dasda.match(trickde)) 
var newurl = url + "de.html";

else if (dasda.match(trickes)) 
var newurl = url + "es.html";

else var newurl = url + "en.html";


impreswin = window.open(newurl,"impressum",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,top=5,left=5,width=700,height=500');
impreswin.focus();
}


function openofertawin(url) {

dasda = document.URL;

trickes = "/" + "es" + "/";
trickde = "/" + "de" + "/";

var orgurl = "/so.";
var deurl = "/so_de.";
var esurl = "/so_es.";

//alert("dasda doc url: " + dasda);
//alert("url: " + url);

if (dasda.match(trickde)) 
//var newurl = url + "&language=de_DE&IM=PP_LHN_SOP_DE_ST_1403";
var newurl = url.replace(orgurl,deurl) + "_DE";

else if (dasda.match(trickes)) 
//var newurl = url + "&language=es_ES&IM=PP_LHN_SOP_ES_ST_1403";
var newurl = url.replace(orgurl,esurl) + "_ES";

else var newurl = url; // + "&language=en&IM=PP_LHN_SOP_US_ST_1403";


ofertawin = window.open(newurl,"offers",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,top=5,left=5,width=900,height=650');
ofertawin.focus();
}


function openweatherwin(url) {
weatherwin = window.open(url,"weather",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top=50,left=50,width=330,height=290');
weatherwin.focus();
}


function openreservawin() {
reservawin = window.open('http://www.hotelsonvida.com/static/lhw_form_include.html','reserva','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top=30,left=30,width=770,height=550');
reservawin.focus();
}

function opencustomwin(url, nombre, w, h, scroll) {
customwin = window.open(url,"customwin",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=' + scroll + ',resizable=1,top=5,left=5,width=' + w + ',height=' + h);
customwin.focus();
}


function openmovwin(url, w, h) {

dasda = document.URL;

trickde = "/" + "de" + "/";
var orgurl = "/e_aw.";
var newurl = "/d_aw.";

if (dasda.match(trickde)) 
var url = url.replace(orgurl,newurl);

movwin = window.open(url,'panotour','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,top=20,left=10,width=790,height=438');
movwin.focus();
}



function opencamwin(url) {
camwin = window.open(url,"100Ansicht",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,top=50,left=50,width=800,height=555');
camwin.focus();
}


function openbigimgwin(url) {
//alert(url);

var mybigimg = window.open(
	'',
	"Image",
	'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top=50,left=50,width=720,height=370'
);

mybigimgsrc='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" \r\n "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">\r\n'+
	'<html lang="es">\r\n'+
	'<head>\r\n'+
	'<title> Arabella Golf &amp; Spa Resort Malloca </title>\r\n'+
	'<meta name="MSSmartTagsPreventParsing" content="true">\r\n'+
	'<meta http-equiv="imagetoolbar" content="no">\r\n'+
//	'<link rel="Stylesheet" href="../stylescript/popup.css" type="text/css" media="all">\r\n'+
	'</head>\r\n'+
	'<body bgcolor="#ffffff"><div class="popupcontent" align="center">\r\n'+
	'<a href="#" onclick="window.close();return false" title="Close Window"><img src="'+url+'" alt="Grand Image" width="700" height="350" border="0"></a>\r\n'+
//	'<p>'+pictekst+'</p>\r\n'+
	'</div></body>\r\n'+
	'</html>';
	mybigimg.document.write(mybigimgsrc);
	mybigimg.document.close();

}




function lengua(targ) {

dashier = document.URL;

//alert(dashier);

tricken = "/" + "en" + "/";
trickes = "/" + "es" + "/";
trickde = "/" + "de" + "/";

targtrick = "/" + targ + "/";

if (dashier.match(tricken)) 
var gesucht = dashier.replace(tricken,targtrick);

if (dashier.match(trickes)) 
var gesucht = dashier.replace(trickes,targtrick);

if (dashier.match(trickde)) 
var gesucht = dashier.replace(trickde,targtrick);

//alert(gesucht);

document.location.href=gesucht;

//document.URL = gesucht;
}


function toggleMode(formname) {
	if(mode) mode_value = mode;
	else if (document.getElementById('list_rdbms')) mode_value = "admin";
	else mode_value = "browse";
	switch (mode_value) {
		case"admin":
			document.getElementById("mymode").value = 'browse';
			break;
		case"browse":
			document.getElementById("mymode").value = 'admin';
			break;			
	}
	if(formname) f_justSubmit(formname)
	else justSubmit();
}


// submit
function f_justSubmit(formname) {
	document.forms[formname].onsubmit(); // workaround browser bugs.
	document.forms[formname].submit();	
}

// submit
function f_setHiddenAndSubmit(hidden_value,hidden_id,formname) {
	document.getElementById(hidden_id).value = hidden_value;
	document.forms[formname].onsubmit(); // workaround browser bugs.
	document.forms[formname].submit();
}






