/* 

file   : global.functions.js
reason : to store functions that are used many times thr00out
         the site.
*/


// take me to the country i want to go to please.
/*function go1111(search_item) {
	(search_item.options[search_item.selectedIndex].value != "null") ? location.href=search_item.options[search_item.selectedIndex].value : alert("Please make a valid selection");
	search_item.selectedIndex = 0;
}
*/

// not really much to do here yet but oh well.
function init() {
 a=document.location;
 
 // i would say this needs to be a BIIIT smarter than this but
 // i cant remeber the js functions i need to use
 // at the momemnt. SO PISS OFF.
 if(a=="http://www.pop2turkey.com/index.php?fuseaction=shop.addshop"){
 	verify('all');
 }
}

function flyMeTo(country) { // the moon?
 imFlyingTo = country.options[country.selectedIndex].value;
 if(imFlyingTo != "") 
  location.href='/index.php/fuseaction/destination.home/location/'+imFlyingTo;
}


function flyMeToW66_wales(country) { // the moon?
 imFlyingTo = country.options[country.selectedIndex].value;
 if(imFlyingTo != "") 
  location.href='/index.php/fuseaction/destination.home/country/wales/location/'+imFlyingTo;
}

function flyMeToW66_england(country) { // the moon?
 imFlyingTo = country.options[country.selectedIndex].value;
 if(imFlyingTo != "") 
  location.href='/index.php/fuseaction/destination.home/country/england/location/'+imFlyingTo;
}

function flyMeToW66_scotland(country) { // the moon?
 imFlyingTo = country.options[country.selectedIndex].value;
 if(imFlyingTo != "") 
  location.href='/index.php/fuseaction/destination.home/country/scotland/location/'+imFlyingTo;
}

function flyMeToW66_northernireland(country) { // the moon?
 imFlyingTo = country.options[country.selectedIndex].value;
 if(imFlyingTo != "") 
  location.href='/index.php/fuseaction/destination.home/country/northernireland/location/'+imFlyingTo;
}



function flyMeToCome2Britain(country) { // the moon?
 imFlyingTo = country.options[country.selectedIndex].value;
 if(imFlyingTo != "") 
  location.href='/index.php/fuseaction/destination.home/country/'+imFlyingTo;
}

function filterAccoms(search_item)
{
  (search_item.options[search_item.selectedIndex].value != "null") 
  	? 
  	location.href=search_item.options[search_item.selectedIndex].value 
  	: 
  	alert("Please make a valid selection");
  
  	search_item.selectedIndex = 0;
}

