//-----------------------------------------------------------------
// Licensed Materials - Property of IBM
//
// WebSphere Commerce
//
// (C) Copyright IBM Corp. 2009, 2010 All Rights Reserved.
//
// US Government Users Restricted Rights - Use, duplication or
// disclosure restricted by GSA ADP Schedule Contract with
// IBM Corp.
//-----------------------------------------------------------------


//show hide funtionality
function showHide(shID) {
	
	var status = 1;
	var currentStatus = document.getElementById("numberOfProducts").value;

	//alert(document.getElementById("numberOfProducts").value);
	if (document.getElementById(shID)) {		
		
		for(; status <= document.getElementById("numberOfProducts").value ; status++){			
			var temp = "info1_"+status;
			//alert(temp);
			if(shID!=temp) {
				document.getElementById(temp+'-show').style.display = 'inline';
				document.getElementById(temp).style.display = 'none';
			}
		}
		if (document.getElementById(shID+'-show').style.display != 'none') {					
		
			document.getElementById(shID+'-show').style.display = 'none';
			document.getElementById(shID).style.display = 'block';
		}
		else {			
		
			document.getElementById(shID+'-show').style.display = 'inline';
			document.getElementById(shID).style.display = 'none';
		}
	}
}


//addresslookup function
function AddLookUp(elementId)
{
	var element = document.getElementById(elementId);
	if(element.style.display != "block") {
		element.style.display = "block";
	} else {
		element.style.display = "none";
	}
	
}

//addresslookup function
function ShowAddressSearch(elementId)
{
	var element1 = document.getElementById(elementId);
	if(element1.style.display != "block") {
		element1.style.display = "block";
	} else {
		element1.style.display = "none";
	}
	
}

//Hide Address Search part when click on Manual Link for Billing Address
function HideSearchforB(elementId)
{
	var elementForManual = document.getElementById(elementId);
	var element1 = document.getElementById('main');
	if(elementForManual.style.display == "block") {
		elementForManual.style.display = "none";
		element1.style.display="none";
	} else {
		elementForManual.style.display = "block";
		element1.style.display="block";
	}
	
}

//Hide Address Search part when click on Manual Link for Delivery Address
function HideSearchforD(elementId)
{
	var elementForManual = document.getElementById(elementId);
	var element1 = document.getElementById('div');
	
	if(elementForManual.style.display == "block") {
		elementForManual.style.display = "none";
		element1.style.display="none";
	} else {
		elementForManual.style.display = "block";
		element1.style.display="block";
	}
	
}
//--------------

function example_ajax_request() {
  $('#example-placeholder').html('<p><img src="../images/ajax-loader.gif" width="220" height="19" /></p>');
  $('#example-placeholder').load("../html/ajax-loaded.html");
}



// check box unchecked function
function toggle(divId) {

	var divArray = document.getElementsByTagName("div");
	for(i = 0; i < divArray.length; i++){
		if(divArray[i].id == divId){
			if(divArray[i].style.display != 'none'){
				divArray[i].style.display = 'none';
			}else{
				divArray[i].style.display = '';
			}
		}
	}
	
}

// "Accept terms" form submission
function showMe()
        {
            if(document.getElementById('Checkbox1').checked)
            {
                document.getElementById('Text1').style.visibility = 'visible';
				document.getElementById('Text1').style.display = 'block';
            }
            else
            {
                document.getElementById('Text1').style.visibility = 'hidden';
				document.getElementById('Text1').style.display = 'none';	
            }
        }
//function showMe (it, box) {
// var vis = (box.checked) ? "block" : "none";
// document.getElementById(it).style.display = vis;
//}


//popup window functioanlity

function toggle(div_id) {
	var el = document.getElementById(div_id);
	if ( el.style.display == 'none' ) {	el.style.display = 'block';}
	else {el.style.display = 'none';}
	//hideMessage("delvMsg");
}

function displayGiftMsg(div_id) {
	var el = document.getElementById(div_id);
	if ( el.style.display == 'none' ) 
	{	
		el.style.display = 'block';		
	}
	else 
	{
		el.style.display = 'none';
		document.getElementById('giftMessage').value = "";
	}
}
// to hide delv message

function hideMessage(div_id){
	var e2 = document.getElementById(div_id) ;
	if ( e2.style.display == 'none' ) {	e2.style.display = 'block';}
	else {e2.style.display = 'none';}	
}

function blanket_size(popUpDivVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportheight = window.innerHeight;
	} else {
		viewportheight = document.documentElement.clientHeight;
	}
	if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) {
		blanket_height = viewportheight;
	} else {
		if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight) {
			blanket_height = document.body.parentNode.clientHeight;
		} else {
			blanket_height = document.body.parentNode.scrollHeight;
		}
	}
	var blanket = document.getElementById('blanket');
	blanket.style.height = blanket_height + 'px';
	var popUpDiv = document.getElementById(popUpDivVar);
	popUpDiv_height=blanket_height/2-200;//150 is half popup's height
	popUpDiv.style.top = popUpDiv_height + 'px';
}
function window_pos(popUpDivVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportwidth = window.innerHeight;
	} else {
		viewportwidth = document.documentElement.clientHeight;
	}
	if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) {
		window_width = viewportwidth;
	} else {
		if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) {
			window_width = document.body.parentNode.clientWidth;
		} else {
			window_width = document.body.parentNode.scrollWidth;
		}
	}
	var popUpDiv = document.getElementById(popUpDivVar);
	window_width=window_width/2-270;//150 is half popup's width
	popUpDiv.style.left = window_width + 'px';
}
function popup(windowname) {
	blanket_size(windowname);
	window_pos(windowname);
	toggle('blanket');
	toggle(windowname);		
}	
	
	
//-------------------------------------


<!-- Hide from non-JavaScript Browsers

function ConfirmChoice()
{
answer = confirm()
if (answer ==0)
{
alert('close')
}

}
//Done Hiding-->



	
// javascript code for calender
	
	
var daysLong =    ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"];

function SelectDate(date,element) {
	/*var selectedDates = getElementsByClassName(document.getElementById('calendar-area'),'a','selected-available');
	for(var i=0, dateLink; i<selectedDates.length; i++){
		dateLink=selectedDates[i];
		dateLink.className='isavailable';
	}

	var datesToSelect = document.getElementsByName(element.name);
	for(var i = 0; i < datesToSelect.length; i++) {
		datesToSelect[i].className = 'selected-available';
	}*/

	dateParts = date.split(",");
	aDate = new Date(dateParts[3], dateParts[0], dateParts[2]);
	monthNum = aDate.getMonth();

	dayName = daysLong[aDate.getDay()];
	
	
	//CalenderDisplayForm.selectedDate1.value= dayName+", "+dateParts[1]+" "+dateParts[2]+" "+dateParts[3];

	document.getElementById('selectedDate').innerHTML = dayName+", "+dateParts[1]+" "+dateParts[2]+" "+dateParts[3];

	document.getElementById('selectedDate1').value = monthNum+" "+dateParts[2]+" "+dateParts[3];
	
};

function NextMonth(currentCounter,nextCounter) {
	hideCalendar=document.getElementById('calendarPanel'+currentCounter);
	hideCalendar.style.display = "none";
	showCalendar=document.getElementById('calendarPanel'+nextCounter);
	showCalendar.style.display = 'block';
	return false;
};
function PreviousMonth(currentCounter,previousCounter) {
	hideCalendar=document.getElementById('calendarPanel'+currentCounter);
	hideCalendar.style.display = "none";
	showCalendar=document.getElementById('calendarPanel'+previousCounter);
	showCalendar.style.display = 'block';
	return false;
};
function processResponse(httpRequest, code)
{
	if (httpRequest.readyState == 4)
    {
        if(httpRequest.status == 200)
        {
            //process the response
            var response = httpRequest.responseText;           
    	   	//Process each of the elements 	
			var listDiv;
			var srcTable;
			if(code == 'B')
			{
				listDiv = document.getElementById("PaymentSearch");
				if(document.getElementById('PaymentTable') != null)
		    	{
		     		listDiv.removeChild(document.getElementById('PaymentTable'));
		    	}
			}
			else if(code == 'D')
			{
				listDiv = document.getElementById("DeliverySearch");
				if(document.getElementById('DeliveryTable') != null)
		    	{
		     		listDiv.removeChild(document.getElementById('DeliveryTable'));
		    	}
				
			}
			if(document.all)
			{
		    	listDiv.style.color = "black";
		    	listDiv.innerText = "";	
		    }
		    else
		    {
		    	listDiv.style.color = "black";
		    	listDiv.textContent = "";
		    }
		    var responseMsg = httpRequest.responseText.split("%");
		    if(responseMsg.length==2)
		    {
		    	var msgTable = document.createElement("table");
		    	msgTable.setAttribute('class', 'visitorType-table');
		    	var msgRow = msgTable.insertRow(-1);	
				var msgCell = msgRow.insertCell(0);				  	
				msgCell.setAttribute('colspan', '4');
				if(document.all)
				{
					msgCell.innerText = responseMsg[0];
				}
				else
				{
					msgCell.textContent = responseMsg[0];
				}
				listDiv.appendChild(msgTable);					
				var rows=responseMsg[1].split("~");
		    }
		    else
		    {
		    	var rows=httpRequest.responseText.split("~");
		    }
		    if(rows.length>2)
		    {		    	
		    	var srcTable = document.createElement("table");
		    	if(code == 'B')
		    	{
		    		srcTable.setAttribute('id', 'PaymentTable');
		    	}
		    	else if(code == 'D')
		    	{
		    		srcTable.setAttribute('id', 'DeliveryTable');
		    	}		    	
				srcTable.setAttribute('class', 'visitorType-table');
								
				
				var headerRow = srcTable.insertRow(-1);					
				var headerCell1 = headerRow.insertCell(0);
				headerCell1.setAttribute('width', '25%');
				headerCell1.setAttribute('class', 'tableheader');
				if(document.all)
				{
					headerCell1.innerText = "Address1";
				}
				else
				{
					headerCell1.textContent = "Address1";
				}		
				var headerCell2 = headerRow.insertCell(1);
				headerCell2.setAttribute('width', '25%');
				headerCell2.setAttribute('class', 'tableheader');
				if(document.all)
				{
					headerCell2.innerText = "Address2";
				}
				else
				{
					headerCell2.textContent = "Address2";
				}				
				var headerCell3 = headerRow.insertCell(2);
				headerCell3.setAttribute('width', '25%');
				headerCell3.setAttribute('class', 'tableheader');		
				if(document.all)
				{
					headerCell3.innerText = "Town / City";
				}
				else
				{
					headerCell3.textContent = "Town / City";
				}
				var headerCell4 = headerRow.insertCell(3);
				headerCell4.setAttribute('width', '25%');
				headerCell4.setAttribute('class', 'tableheader');		
				if(document.all)
				{
					headerCell4.innerText = "Post code";
				}
				else
				{
					headerCell4.textContent = "Post code";
				}
				for(i=0; i<rows.length; i++)
				{
					var tmpRow = srcTable.insertRow(-1);		
					var cols = rows[i].split("+");
					for(j=0; j<cols.length; j++)		
					{
						var tmpCell = tmpRow.insertCell(j);
						tmpCell.setAttribute('width', '25%');
						if(j==0)
						{
							var mya = document.createElement("a");
							mya.appendChild(document.createTextNode(cols[j]));
							if(code == 'B')
					    	{
					    		mya.setAttribute("href","javascript:selectPaymentAddress('"+rows[i]+"');");   
					    	}
					    	else if(code == 'D')
					    	{
					    		mya.setAttribute("href","javascript:selectDeliveryAddress('"+rows[i]+"');");   
					    	}							
							tmpCell.appendChild(mya);
						}
						else
						{
							if(document.all)
							{
								tmpCell.innerText = cols[j];
							}
							else
							{
								tmpCell.textContent = cols[j];
							}
						}
					}
				}
				if(code == 'B'){
					document.getElementById("bSearchButton").disabled = false;
				}
				if(code == 'D'){
					document.getElementById("dSearchButton").disabled = false;
				}
		        listDiv.appendChild(srcTable);
		    }
		    else if(rows.length==2)
		    {
		    	if(code == 'B')
		    	{
		    		selectPaymentAddress(rows[0]);
		    	}
		    	else if(code == 'D')
		    	{
		    		selectDeliveryAddress(rows[0]);
		    	}
		    }
		    else
		    {
		    	if(document.all)
		    	{
		    		listDiv.style.color = "red";
		    		listDiv.innerText = response;
		    		
		    	}
		    	else
		    	{
		    		listDiv.style.color = "red";
		    		listDiv.textContent = response;
		    	}
		    	if(code == 'B'){
				document.getElementById("bSearchButton").disabled = false;
			}
			if(code == 'D'){
				document.getElementById("dSearchButton").disabled = false;
			}
		    }
        }
		else
		{
			if(code == 'B'){
				document.getElementById("bSearchButton").disabled = false;
			}
			if(code == 'D'){
				document.getElementById("dSearchButton").disabled = false;
			}
			alert("Error loading page\n"+ httpRequest.status +":"+ httpRequest.statusText);
		}
	}	        
};	

function checkCountry(code, type, billingPostcodeReqd, enableAddressSearch)	 
	{
		var countryCode;
		var element;
		var button;
		if(code == 'B')
		{
			countryCode = document.getElementById("billingCountry").value;
			button = document.getElementById("bSearchButton");	
			element = document.getElementById("divManualAddr");
			elementzipCode = document.getElementById("zipCodeDiv");
			elementzipCodeWithSpace = document.getElementById("zipCodeDivWithSpace");
			elementBlockSearch = document.getElementById("blockCodeforB");
			
			//Get the 2 char country code and check if it is present in billingPostcodeReqd
			//If yes - then display * against zip code
			//If no - then do not display * against zip code
			country = countryCode.split('+')[0];
			if (billingPostcodeReqd.indexOf(country) != -1) {
				elementzipCode.style.display = "block";
				elementzipCodeWithSpace.style.display="none";				
				elementBlockSearch.style.display="block";
				
			}
			else {
				elementzipCode.style.display = "none";
				elementzipCodeWithSpace.style.display="block";
				elementBlockSearch.style.display="none";
			}
		}
		else if(code == 'D')
		{
			element = document.getElementById("divManualAddr1");
			elementBlockSearch = document.getElementById("blockCodeforD");
			if(element!=null)
			{
				countryCode = document.getElementById("deliveryCountry").value;
				button = document.getElementById("dSearchButton");				
			
				
			
			//Get the 2 char country code and check if it is present in billingPostcodeReqd
			//If yes - then display * against zip code
			//If no - then do not display * against zip code
			
			country = countryCode.split('+')[0];
			if (billingPostcodeReqd.indexOf(country) != -1) {
				elementBlockSearch.style.display="block";
			}
			else {
				elementBlockSearch.style.display="none";
				}
				}
		}
		if(element!=null)
		{
			var countryCode = countryCode.split("+");
			//If countryCode does not have the format US+USA, that means the country is not QAS enabled
	   		if(countryCode[1].length==0)
	   		{
	   			button.disabled=true; //Disable address search button
	   			if(type!='R'){
		   			if(element.style.display != "block") {
						element.style.display = "block";					
					}
				}
	   		}  
	   		else { //Country is QAS enabled
	   			//We need to check if the country code is present in enableAddressSearch
	   			if (enableAddressSearch.indexOf(countryCode[0]) != -1) {
	   				//Country is present in enableAddressSearch so address search should be enabled  			
					element.style.display = "none";
					elementBlockSearch.style.display="block";
					button.disabled=false;
				}
				else {
					//Country is not present in enableAddressSearch so address search should be disabled
					button.disabled=true; //Disable address search button
					elementBlockSearch.style.display="none";//Hide Address Search PostCode Block(Bug# 255)
		   			if(type!='R'){
			   			if(element.style.display != "block") {
							element.style.display = "block";					
						}
					}
				}
			}
		}
};
function selectPaymentAddress(value)
{
	var element = document.getElementById('divManualAddr');
	var elementSearch = document.getElementById('PaymentSearch');
	if(element.style.display != "block") {
		element.style.display = "block";
	}
	var cols = value.split("+");
	document.getElementById('pmntAddress1').value = cols[0];
	document.getElementById('pmntAddress2').value = cols[1];
	document.getElementById('pmntCity').value = cols[2];
	document.getElementById('pmntPostcode').value = cols[3];
	elementSearch.style.display="none";			
};
function selectDeliveryAddress(value)
{
	var element = document.getElementById('divManualAddr1');
	var elementSearch = document.getElementById('DeliverySearch');
	if(element.style.display != "block") {
		element.style.display = "block";
	}
	var cols = value.split("+");
	document.getElementById('deliveryAddress1').value = cols[0];
	document.getElementById('deliveryAddress2').value = cols[1];
	document.getElementById('deliveryCity').value = cols[2];
	document.getElementById('deliveryPostcode').value = cols[3];
	elementSearch.style.display="none";			
};	

// Function to Direct the user to the brand url for exiting the commerce solution

 function deleteAllCookies() 
{    
 var cookies = document.cookie.split(";"); 

      for (var i = 0; i < cookies.length; i++)
	 {         
		 var cookie = cookies[i]; 
      var eqPos = cookie.indexOf("="); 
       var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; 
      document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; 
         
       
      }         
}  

function goBrandURL()
{

deleteAllCookies();
 
var targetURL = null;
switch (attraction) 
{
	case "Warwickcastle" : targetURL="http://www.warwick-castle.co.uk"; break;
	case "SealifeBirmingham" : targetURL="http://www.sealife.com"; break;
	case "Alton_Towers" : targetURL="http://www.altontowers.com"; break;
	case "Chessington_WOA" : targetURL="http://www.chessington.com"; break;
	case "Dungeon_London" : targetURL="http://www.the-dungeons.co.uk/london"; break;
	case "Dungeon_York" : targetURL="http://www.the-dungeons.co.uk/york"; break;
	case "Dungeon_Edinburgh" : targetURL="http://www.the-dungeons.co.uk/edinburgh"; break;
	case "Dungeon_Hamburg" : targetURL="http://www.the-dungeons.de"; break;
	case "Dungeon_Amsterdam" : targetURL="http://www.the-dungeons.nl"; break;
	case "LL_Windsor" : targetURL="http://www.legoland.co.uk"; break;
	case "LL_Deutschland" : targetURL="http://www.legoland.de/resort"; break;
	case "LL_Billund" : targetURL="http://www.legoland.dk"; break;
	case "LL_California" : targetURL="http://www.legoland.com/California.htm"; break;
	case "LLDC_Berlin" : targetURL="http://www.legolanddiscoverycenter.com/berlin"; break;
	case "LLDC_Duisburg" : targetURL="http://www.legolanddiscoverycenter.com/duisburg"; break;
	case "LLDC_Chicago" : targetURL="http://www.legolanddiscoverycenter.com/chicago"; break;
	case "LLDC_Manchester" : targetURL="http://www.legolanddiscoverycenter.com/manchester"; break;
	case "London_Eye" : targetURL="http://www.londoneye.com"; break;
	case "MT_London" : targetURL="http://www.madametussauds.com/London/Default.aspx"; break;
	case "MT_Blackpool" : targetURL="http://www.madametussauds.com/Blackpool/Default.aspx"; break;
	case "MT_Shanghai" : targetURL="http://www.madametussauds.com/Shanghai/Default.aspx"; break;
	case "MT_Berlin" : targetURL="http://www.madametussauds.com/Berlin/Default.aspx"; break;
	case "MT_Amsterdam" : targetURL="http://www.madametussauds.com/Amsterdam/Default.aspx"; break;
	case "MT_Washington" : targetURL="http://www.madametussauds.com/Washington/Default.aspx"; break;
	case "MT_New_York" : targetURL="http://www.madametussauds.com/NewYork/Default.aspx"; break;
	case "MT_Las_Vegas" : targetURL="http://www.madametussauds.com/LasVegas/Default.aspx"; break;
	case "MT_Hollywood" : targetURL="http://www.madametussauds.com/Hollywood/Default.aspx"; break;
	case "MT_Hong_Kong" : targetURL="http://www.madametussauds.com/HongKong/Default.aspx"; break;
	case "SEALIFE_London" : targetURL="http://www.sealife.co.uk"; break;
	case "SEALIFE_Birmingham" : targetURL="http://www.sealife.co.uk"; break;
	case "SEALIFE_Blackpool" : targetURL="http://www.sealife.co.uk"; break;
	case "SEALIFE_Brighton" : targetURL="http://www.sealife.co.uk"; break;
	case "SEALIFE_Yarmouth" : targetURL="http://www.sealife.co.uk"; break;
	case "SEALIFE_Gweek" : targetURL="http://www.sealsanctuary.co.uk"; break;
	case "SEALIFE_Hunstanton" : targetURL="http://www.sealsanctuary.co.uk"; break;
	case "SEALIFE_Lomond" : targetURL="http://www.sealife.co.uk"; break;
	case "SEALIFE_Oban" : targetURL="http://www.sealsanctuary.co.uk"; break;
	case "SEALIFE_Scarborough" : targetURL="http://www.sealife.co.uk"; break;
	case "SEALIFE_Bray" : targetURL="http://www.sealife.ie"; break;
	case "SEALIFE_Weymouth" : targetURL="http://www.sealife.co.uk"; break;
	case "SEALIFE_Berlin" : targetURL="http://www.sealife.de"; break;
	case "SEALIFE_Hannover" : targetURL="http://www.sealife.de"; break;
	case "SEALIFE_Konigswinter" : targetURL="http://www.sealife.de"; break;
	case "SEALIFE_Konstanz" : targetURL="http://www.sealife.de"; break;
	case "SEALIFE_Munich" : targetURL="http://www.sealife.de"; break;
	case "SEALIFE_Oberhausen" : targetURL="http://www.sealife.de"; break;
	case "SEALIFE_Speyer" : targetURL="http://www.sealife.de"; break;
	case "SEALIFE_Timmendorfer_Strand" : targetURL="http://www.sealife.de"; break;
	case "SEALIFE_Helsinki" : targetURL="http://www.sealife.fi"; break;
	case "SEALIFE_Paris" : targetURL="http://www.sealife.fr"; break;
	case "SEALIFE_Blankenberge" : targetURL="http://www.sealife.be"; break;
	case "SEALIFE_Scheveningen" : targetURL="http://www.sealife.nl"; break;
	case "SEALIFE_California" : targetURL="http://www.sealifeus.com"; break;
	case "SEALIFE_Benalmadena" : targetURL="http://www.sealife.es"; break;
	case "SEALIFE_Porto" : targetURL="http://www.sealifeeurope.com"; break;
	case "SEALIFE_Gardaland" : targetURL="http://www.sealifeeurope.com"; break;
	case "Thorpe_Park" : targetURL="http://www.thorpepark.com"; break;

	default: targetURL = "http://www.merlinentertainments.biz/en/brandportal.aspx"
}

document.location=targetURL; 
}

// Function to Direct the user the attractions terms and conditions
function goConditionsURL()
{

var targetURL = null;
switch (attraction) 
{
	case "Warwickcastle" : targetURL="http://www.warwick-castle.com/misc/online-sales/terms.aspx"; break;
	case "SealifeBirmingham" : targetURL="http://www.sealife.com/terms"; break;
	case "Alton_Towers" : targetURL="http://www.altontowers.com/tandcs/ticket-booking"; break;
	case "Thorpe_Park" : targetURL="http://www.thorpepark.com/misc/terms-and-conditions.aspx"; break;
	case "MT_New_York" : targetURL="http://www.madametussauds.com/NewYork/Terms.aspx"; break;
	case "MT_London" : targetURL="http://www.madametussauds.com/London/About/StandardTermsandConditions/Default.aspx"; break;
	case "MT_Las_Vegas" : targetURL="http://www.madametussauds.com/LasVegas/BuyTickets/Default.aspx"; break;
	case "MT_Washington" : targetURL="http://www.madametussauds.com/Washington/Terms.aspx"; break;
	case "MT_Hollywood" : targetURL="http://reservations.madametussauds.com/3381_termsofuse.html"; break;
	case "London_Eye" : targetURL="http://www.londoneye.com/TermsAndConditions.aspx"; break;
	case "Chessington_WOA" : targetURL="http://www.chessington.com/misc/terms.asp"; break;
	case "Dungeon_London" : targetURL="http://www.the-dungeons.co.uk/london/en/terms-and-conditions.htm"; break;
	case "Dungeon_York" : targetURL="http://www.the-dungeons.co.uk/york/en/terms-and-conditions.htm"; break;
	case "Dungeon_Edinburgh" : targetURL="http://www.the-dungeons.co.uk/york/en/terms-and-conditions.htm"; break;
	case "Dungeon_Amsterdam" : targetURL="http://www.the-dungeons.nl/amsterdam/nl/terms-and-conditions"; break;
	case "Dungeon_Hamburg" : targetURL="http://www.the-dungeons.de/hamburg/de/terms-and-conditions.htm"; break;
	case "SEALIFE_London" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "SEALIFE_Birmingham" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "SEALIFE_Blackpool" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "SEALIFE_Brighton" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "SEALIFE_Yarmouth" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "SEALIFE_Gweek" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "SEALIFE_Hunstanton" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "SEALIFE_Lomond" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "SEALIFE_Oban" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "SEALIFE_Scarborough" : targetURL="http://www.sealife.co.uk/terms.html"; break;
	case "LEGOLAND_Windsor" : targetURL="http://www.legoland.dk/Visit/Prices/onlineshopterms.htm?lc=en"; break;
	case "LEGOLAND_Deutschland" : targetURL="http://www.legoland.de/Misc/Legal+notice.htm"; break;
	case "LEGOLAND_California" : targetURL="https://172.16.198.11/LLC/Shop/ItemDetailPopUp.aspx?SalesChannelDetailID=4"; break;
	case "LLDC_Berlin" : targetURL="www.legolanddiscoverycentre.de/berlin/de/terms-and-conditions.htm"; break;
	case "LLDC_Duisburg" : targetURL="www.legolanddiscoverycentre.de/duisburg/de/terms-and-conditions.htm"; break;
	case "LLDC_Chicago" : targetURL="www.legolanddiscoverycenter.com/chicago/en/terms-and-conditions.htm"; break;
	case "LLDC_Manchester" : targetURL="www.legolanddiscoverycentre.co.uk/manchester/en/terms-and-conditions.htm"; break;


 	default: targetURL = "http://www.merlinentertainments.biz/en/brandportal.aspx"
}

//targetURL = targetURL & "?language=" & language;
window.open(targetURL,"",'width=600, height=600, resizable=no, scrollbars=yes, toolbar=no, location=yes, status=no, menubar=no');
}

