function writeMap()
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="775" height="360"><param name="movie" value="14462_newStoresLP.swf"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="14462_newStoresLP.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="775" height="360" wmode="transparent"></embed></object>');
} 

function openPopup(theURL,winName,features) { //v2.0
  	window.open(theURL,winName,features);

}

function setEvent(){ 
	var d=new Date();
	var day=d.getDate();
	var month=d.getMonth() + 1;
	var year = d.getYear();
	var hour = d.getHours();
	var storeNameEncoded = encodeURIComponent(storeName);
	var storeList = new Array();
	var storeListLen;

	if (month == 4 && day < 17) {
		
			/*storeList = ["The Shops at Stone Park", "Mill Crossing", "Valley Crossing Shopping Center"];
			
			storeListLen = storeList.length;
			
			for (i = 0; i < storeListLen; i++) {
				if (storeName == storeList[i]) 
				{*/
					/*document.getElementById("promotest").innerHTML = '<a href="../../events.html?s=' + storeNameEncoded + '" ><img src="../../images/events/wk11/eventbug.jpg" width="244" height="234" border="0" alt="lowest prices of the spring get event details &gt;" title="lowest prices of the spring get event details &gt;" /></a>';
					document.getElementById("promo2").style.display = "block";
				/*}
			}*/

	} 
}

function writeStoreCrumb(){
	name = 's';
	var regexS = "[\\?&]"+name+"=([^&#]*)";  var regex = new RegExp( regexS );  
	var results = regex.exec( window.location.href );  
	if(results != null){
		var decoded = decodeURIComponent(results[1]);
		var upStores = new Array("The Shops at Stone Park", "Mill Crossing", "Valley Crossing Shopping Center","South Hill Mall","The Promenade Shops at Orchard Valley ","Prairie Center","Owasso","StoneCreek Crossing","New Braunfels Town Center at Creekside","Market Street Flowood","Turkey Creek Shopping Center","The Shops at White Oak Village","Clermont Landing","Hiram Square","Shoppes of Prairie Ridge","Summit Fair","Alexandria Mall","The Village at Fairview");
		var isUPStore=true;
	
			for(i=0; i<15; i++) { 
				if(upStores[i]==decoded){
					isUPStore=false;
				}
			}
			
			if(results[1] != null){
				if(isUPStore){
					document.write("<a href='javascript:history.go(-1)'>" + decoded + '</a>');
				}else{
					document.write("<a href=\"index.html\">see all new stores</a><p>&nbsp;&gt;&nbsp;</p><a href='javascript:history.go(-1)'>" + decoded + '</a>');	
				}
			}
	}
}
// Using AJAX to include global files
var divID = "";
function ajaxInclude(url, divID) {
	var req = false;
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
	}	else if (window.ActiveXObject) {
		try {
			req = new ActiveXObject("Msxml2.XMLHTTP")
		} 
		catch (e){
			try {
				req = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	} else {
		return false;
	}
	req.open('GET', url, false) //get page synchronously 
	req.send(null)
	writeContent(req, divID)
}
function writeContent(req, divID){
	if (window.location.href.indexOf("http")==-1 || req.status==200) {
		document.getElementById(divID).innerHTML = req.responseText;
	}
}
