// -- Adobe GoLive JavaScript Library
// -- Global Functions


var preloadFlag = false;

function CSScriptInit() {
	if(typeof(skipPage) != "undefined") { if(skipPage) return; }
	idxArray = new Array;
	for(var i=0;i<CSInit.length;i++)
		idxArray[i] = i;
	CSAction2(CSInit, idxArray);

	if (document.images) {
		mart_fran_opp_over = newImage("images/index_franchiseopportuni-05.gif");	
		mart_store_loc_over = newImage("images/index_storelocator_over.gif");
		mart_tips_over = newImage("images/index_tipofthemonth_over.gif");
		mart_coupons_over = newImage("images/index_coupons_over.gif");
		mart_contactus_over = newImage("images/index_contactus_over.gif");
		mart_sayitbest_over = newImage("images/index_franchiseessayitbest_.gif");
		mart_fran_login_over = newImage("images/index_login_over.gif");
		preloadFlag = true;
	}
}

function newImage(arg){
	if(document.images){
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
function changeImages(){
	if (document.images && (preloadFlag == true)){
		for (var i=0; i<changeImages.arguments.length ; i+=2){
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}



CSInit = new Array;
CSExit = new Array;
CSStopExecution=false;
function CSAction(array) {return CSAction2(CSAct, array);}
function CSAction2(fct, array) { 
	var result;
	for (var i=0;i<array.length;i++) {
		if(CSStopExecution) return false; 
		var aa = fct[array[i]];
		if (aa == null) return false;
		var ta = new Array;
		for(var j=1;j<aa.length;j++) {
			if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){
				if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}
				else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}
				else ta[j]=aa[j];}
			} else ta[j]=aa[j];
		}			
		result=aa[0](ta);
	}
	return result;
}
CSAct = new Object;
CSIm=new Object();









function PopUp(sName, URL) {

//these 2 lines can be used to generate a unique name for the window
day = new Date();
id = day.getTime();

//this line always uses the same window name, so only one window will ever open up
//window.open(URL, 'silicommpopup', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=350,left=0,top=0');

//this line gives the popup a different name each time based off of system time, so a different window opens up each time
sName = window.open(URL, sName, 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=400,height=450,left=0,top=0');
//eval(sName).focus();
sName.focus();
}

// -- Action Functions




























































// EOF
