﻿var	mainImages = [
    'images/subwaykids_grownups_top.jpg',
	'images/subwaykids_grownups_middle-up.jpg',
	'images/subwaykids_grownups_middle-down.jpg',
	'images/subwaykids_grownups_bottom.jpg',
	'images/subwaykids_kids_top.jpg',
	'images/subwaykids_kids_middle-up.jpg',
	'images/subwaykids_kids_middle-down.jpg',
	'images/subwaykids_kids_bottom.jpg'];
			
function preloadImages() {
	var preNav = new Array();
	for (i = 0; i < mainImages.length; i++) {
		preNav[i] = new Image();
		preNav[i].src = mainImages[i];
	}
}

function toggleLegal() {
    l = document.getElementById('legal');    
    t = document.getElementById('legaltext');
    if (l.style.display != "block") {
        l.style.display = "block"; 
        t.innerHTML = "Hide Legal";   
    } else {
        l.style.display = "none";        
        t.innerHTML = "View Legal";
    }
}

function exitConfirm() {
    return confirm("You are now leaving the SUBWAY"+ unescape("%AE")+" restaurants website(s)."+'\n\n'+"The policies, including the privacy policy, on the site(s) you are going to may vary from SUBWAY"+ unescape("%AE")+" restaurants policies. SUBWAY"+ unescape("%AE")+" restaurants is not responsible for the policies and practices of other companies.");
}

function exitSubway() {
    return confirm("You are now leaving the the SUBWAY KIDS(TM) website. Please click OK to continue.");
}

function exitFlash(strURL) {
    var answer = confirm("You are now leaving the SUBWAY"+ unescape("%AE")+" restaurants website(s)."+'\n\n'+"The policies, including the privacy policy, on the site(s) you are going to may vary from SUBWAY"+ unescape("%AE")+" restaurants policies. SUBWAY"+ unescape("%AE")+" restaurants is not responsible for the policies and practices of other companies.")
	if (answer){
		window.location = strURL;
	}
	else{
		//do nothing
	}

}