



//About us tab

function defaultPopulation(){
	var url = window.location.search;
	url= url.substring(url.indexOf("=")+1, url.length)
	if(url.length){
		contentPopulate('2');
	}else{
		document.getElementById('img'+0).src = 'common/images/tabberactive_bg'+0+'.gif';
		document.getElementById('div'+0).style.display = "block";
	}
}
function contentPopulate(value){

	var imageContentArray = new Array(5);
	for(var i=0;i<imageContentArray.length;i++){
		imageContentArray[i] = i;
		if(imageContentArray[i]==value){
			document.getElementById('img'+i).src = 'common/images/tabberactive_bg'+i+'.gif';
			document.getElementById('div'+i).style.display = "block";
			
		}
		else{
			document.getElementById('img'+i).src = 'common/images/tabberunactive_bg'+i+'.gif';
			document.getElementById('div'+i).style.display="none";
		}
	}

}


//Services tab

function servicesdefaultPopulation(){
	
	document.getElementById('img'+5).src = 'common/images/tabberactive_bg'+5+'.gif';
	document.getElementById('div'+5).style.display = "block";
}
function servicescontentPopulate(value){

	var imageContentArray = new Array(4);
	for(var i=0;i<imageContentArray.length;i++){
		var idx=i+5;
		imageContentArray[i] = idx;
		if(imageContentArray[i]==value){
			document.getElementById('img'+idx).src = 'common/images/tabberactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display = "block";
			document.getElementById('bluecar').style.display= idx==7?"none":"block";
			}
		else{
			document.getElementById('img'+idx).src = 'common/images/tabberunactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display="none";
		}
	}
}




//Franchising Tab

function franchisingdefaultPopulation(){
	//alert('1');
	document.getElementById('img'+9).src = 'common/images/tabberactive_bg'+9+'.gif';

	document.getElementById('div'+9).style.display = "block";

}
function franchisingcontentPopulate(value){

	var imageContentArray = new Array(3);
	for(var i=0;i<imageContentArray.length;i++){
		var idx=i+9;
		imageContentArray[i] = idx;
		if(imageContentArray[i]==value){
			document.getElementById('img'+idx).src = 'common/images/tabberactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display = "block";
			
			}
		else{
			document.getElementById('img'+idx).src = 'common/images/tabberunactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display="none";
		}
	}
	
	if (value==11)
	{
		document.getElementById('franconnectform').style.display="block";
	}
	else
	{
		document.getElementById('franconnectform').style.display="none";
	}
}


//location Tab

function locationdefaultPopulation(){
	document.getElementById('img'+12).src = '../common/images/tabberactive_bg'+12+'.gif';
	document.getElementById('div'+12).style.display = "block";
}
function locationcontentPopulate(value){

	var imageContentArray = new Array(4);
	for(var i=0;i<imageContentArray.length;i++){
		var idx=i+12;
		imageContentArray[i] = idx;
		if(imageContentArray[i]==value){
			document.getElementById('img'+idx).src = '../common/images/tabberactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display = "block";
			
			}
		else{
			document.getElementById('img'+idx).src = '../common/images/tabberunactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display="none";
		}
	}

}


//Cincinnati Tab

function cincinnatidefaultPopulation(){
	document.getElementById('img'+16).src = '../common/images/tabberactive_bg'+16+'.gif';
	document.getElementById('div'+16).style.display = "block";
}
function cincinnaticontentPopulate(value){

	var imageContentArray = new Array(2);
	for(var i=0;i<imageContentArray.length;i++){
		var idx=i+16;
		imageContentArray[i] = idx;
		if(imageContentArray[i]==value){
			document.getElementById('img'+idx).src = '../common/images/tabberactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display = "block";
			
			}
		else{
			document.getElementById('img'+idx).src = '../common/images/tabberunactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display="none";
		}
	}

}

// common function for read url
function getUrlParamArray(param) 
{ 
  param = param.replace(/([\[\](){}*?+^$.\\|])/g, "\\$1"); 
  var value = []; 
  var regex = new RegExp("[?&]" + param + "=([^&#]*)", "g"); 
  var url   = decodeURIComponent(window.location.href); 
  var match = null; 
  while (match = regex.exec(url)) { 
    value.push(match[1]); 
  }     
  return value; 
}

function getURLTab() {

var val = getUrlParamArray("indxId");
var val1 = getUrlParamArray("indxId1");

	if(val == 01){
		alert();
		promotionsdefaultPopulation();
		
	}else if(val1 == 02){
		
		promotionscontentPopulate(21);
		//HGBdefaultPopulation();
		
	}else{
		promotionsdefaultPopulation();
	}
}
	
// Promotion Tab
function promotionsdefaultPopulation(){
		document.getElementById('img'+19).src = 'common/images/tabberactive_bg'+19+'.gif';
		document.getElementById('div'+19).style.display = "block";
		//HGBdefaultPopulation();
		
}
function promotionscontentPopulate(value){
	var imageContentArray = new Array(3);
	for(var i=0;i<imageContentArray.length;i++){
		var idx=i+19;
		imageContentArray[i] = idx;
		if(imageContentArray[i]==value){
			document.getElementById('img'+idx).src = 'common/images/tabberactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display = "block";
			
			}
		else{
			document.getElementById('img'+idx).src = 'common/images/tabberunactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display="none";
			
		}
	}
}

/*Holiday Gift Book  Tab
function HGBdefaultPopulation(){
	document.getElementById('img'+22).src = 'common/images/tabberactive_bg'+22+'.gif';
	document.getElementById('div'+22).style.display = "block";
}
function HGBcontentPopulate(value){

	var imageContentArray = new Array(2);
	for(var i=0;i<imageContentArray.length;i++){
		var idx=i+22;
		imageContentArray[i] = idx;
		if(imageContentArray[i]==value){
			document.getElementById('img'+idx).src = 'common/images/tabberactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display = "block";
			}
			
		else{
			document.getElementById('img'+idx).src = 'common/images/tabberunactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display="none";
		}
	}

}
8?

//early bird Tab

/*function ebdefaultPopulation(){
	document.getElementById('img'+24).src = 'common/images/tabberactive_bg'+24+'.gif';
	document.getElementById('div'+24).style.display = "block";
}*/
function ebdefaultPopulation(){
 
 var val = getUrlParamArray("indxId");
 var val1 = getUrlParamArray("indxId1");
 
 if((val == 21) && (val1 == 25)){
 
  promotionscontentPopulate(21);
  ebcontentPopulate(25);  
 }
else if(val == 21){
 
  promotionscontentPopulate(21);
  ebcontentPopulate(24);  
 }
 
 else{
  document.getElementById('img'+24).src = 'common/images/tabberactive_bg'+24+'.gif';
  document.getElementById('div'+24).style.display = "block";
 }
}

function ebcontentPopulate(value){

	var imageContentArray = new Array(2);
	for(var i=0;i<imageContentArray.length;i++){
		var idx=i+24;
		imageContentArray[i] = idx;
		if(imageContentArray[i]==value){
			document.getElementById('img'+idx).src = 'common/images/tabberactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display = "block";
			
			}
		else{
			document.getElementById('img'+idx).src = 'common/images/tabberunactive_bg'+idx+'.gif';
			document.getElementById('div'+idx).style.display="none";
		}
	}

}
//common function//

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function OpenPopup(obj){
	var url_add = obj; 
	 window.open(url_add,'Map','width=600,height=500,menubar=no,status=yes,location=no,toolbar=no,scrollbars=no,resizable=yes');
}