




/*
     FILE ARCHIVED ON 4:20:33 Jan 29, 2011 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 14:59:58 Dec 19, 2011.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
if(navigator.appName=="Netscape")
	document.write("<link rel='stylesheet' href='/CT/css/ns.css' type='text/css'>");
else
	document.write("<link rel='stylesheet' href='/CT/css/ie.css' type='text/css'>");

function fNavigate(mChoice)
{
	var sChoice = mChoice.options[mChoice.selectedIndex].value;
	
	if(sChoice!="")
	{
		document.frmCroatiaMain.action="/CT/Cover.asp?sChoice="+sChoice;
		document.frmCroatiaMain.submit();
	}	
}

function replaceChar(sChar)
{
	//alert("char before: "+sChar);
	var inStr = sChar;
	
	r1=new Array("å","ä","ö","Å","Ä","Ö");
	r2=new Array("%26aring%3B","%26auml%3B","%26ouml%3B","%26Aring%3B","%26Auml%3B","%26Ouml%3B");
		
	for(var i=0; i<r1.length;i++)
	{
		var repExp = new RegExp(r1[i], "g");
		inStr = inStr.replace(repExp,r2[i]);
		
	}
    //alert("char after: "+inStr);
	return inStr;
}

function sendMail()
{
	//Required fields
	var sFname			= replaceChar(document.frmCroatiaMain.sFname.value);
	var sLname			= replaceChar(document.frmCroatiaMain.sLname.value);
	var sPhone			= replaceChar(document.frmCroatiaMain.sPhone.value);
	var sAddress		= replaceChar(document.frmCroatiaMain.sAddress.value);
	var sZip			= replaceChar(document.frmCroatiaMain.sZip.value);
	var sCounty			= replaceChar(document.frmCroatiaMain.sCounty.value);
	
	//Optional fields
	var sMail			= replaceChar(document.frmCroatiaMain.sMail.value);
	var selBefore		= document.frmCroatiaMain.selBefore.value;
	var sTourOperator	= replaceChar(document.frmCroatiaMain.sTourOperator.value);
	var sFavourite		= replaceChar(document.frmCroatiaMain.sFavourite.value);
	var sNextVaccation	= replaceChar(document.frmCroatiaMain.sNextVaccation.value);
	var sNewDestination	= replaceChar(document.frmCroatiaMain.sNewDestination.value);
	var selPlzContact	= document.frmCroatiaMain.selPlzContact.value;
	
	//var sRequired = "";
	
	if(sFname.length = "")
		sRequired				+= ' - Förnamn\n'
	if(sLname.length == "")
		sRequired = sRequired	+= ' - Efternamn\n'
	if(sPhone.length == "")
		sRequired = sRequired	+= ' - Telefon\n'
	if(sAddress.length == "")
		sRequired = sRequired	+= ' - Gatuadress\n'
	if(sZip.length == "")
		sRequired = sRequired	+= ' - Postnummer\n'
	if(sCounty.length == "")
		sRequired = sRequired	+= ' - Ort\n'
	
	if(sFname.length != "" && sLname.length != "" && sAddress.length != "" && sZip.length != "" && sCounty.length != "")
	{
		alert("Din beställning skickas nu.");
		location.href="/CT/Cover.asp?sFname="+sFname+"&sLname="+sLname+"&sPhone="+sPhone+"&sAddress="+sAddress+"&sZip="+sZip+"&sCounty="+sCounty+"&sMail="+sMail+"&selBefore="+selBefore+"&sTourOperator="+sTourOperator+"&sFavourite="+sFavourite+"&sNextVaccation="+sNextVaccation+"&sNewDestination="+sNewDestination+"&selPlzContact="+selPlzContact;
	}
	else
		alert("OBS! Dessa uppgifter måste fyllas i:\n\n" + sRequired);
}

