// JavaScript Document
var IE = /*@cc_on!@*/false;

function $(id) {
var $ = document.getElementById(id);

$.fadeIn = function(delay,callbk,out) {
    var _this = this;
    for (i = 1; i <= 100; i++) {
      (function(j) {
            setTimeout(function() {  
                  if (out==true) j=100-j;
                  _this.style.opacity = j/100;
                  _this.style.MozOpacity = j/100;
                  _this.style.KhtmlOpacity = j/100;
                  _this.style.zoom = 1; // for ie, set haslayout
                  _this.style.display="block"; 
                   if (j==100&&callbk!=undefined) {callbk.call(_this);}
                   else if (out==true&&callbk!=undefined&&j==0) {callbk.call(_this);}
                  _this.style.filter = "alpha(opacity=" + j + ");";},j*delay/100);
                 
        })(i);     
    }
};

$.fadeOut = function(delay,callbk) {
    $.fadeIn(delay,callbk,true);
};

return $;
}

if (document.images) 
{
	var cityArray = new Array("boston", "fort_worth", "houston", "denver", "new_york", "philadelphia", "las_vegas", "charlotte", "dallas");
	
	for(i = 0; i < cityArray.length; i++){
	document["pic"+i]= new Image(100,25); 
	document["pic"+i].src="main-images/locbkg/bkg-"+cityArray[i]+".jpg"; 	
	}
	
	
	function lightup(idName)
{
	//if(IE){
	//document.getElementById('location-fort_worth').style.filter ="alpha(opacity=25)";
	//document.getElementById('location-fort_worth').style.opacity= ".25";
		
	//}else{
		
	
	
	for(i=0; i < cityArray.length;i++){
	if (idName != cityArray[i]){
	var theid = document.getElementById('location-'+cityArray[i]);
	//theid.setAttribute("className", "faded");
	theid.setAttribute("class", "faded");
	}else{
	var theid = document.getElementById('location-'+idName);
	//theid.setAttribute("className", "notfaded");
	theid.setAttribute("class", "notfaded");
	}
	}
	
}
	
	
	function turnoff(idName)
{
		
	
	for(i=0; i < cityArray.length;i++){
	var theid = document.getElementById('location-'+cityArray[i]);
	//theid.setAttribute("className", "notfaded");
	theid.setAttribute("class", "notfaded");
	}
	
}
	
	turnoff();

	
	
	
	
	function loadup(idName)
{	
	if (idName == "boston"){
	var biginfo = "250 Northern Avenue<br>Suite 200<br>Boston, MA 02210<br>Tel: (617) 951-1368<br>Email : delfriscos.boston@steakco.com";
	var reservlink = "http://www.opentable.com/single.aspx?rid=61225&restref=61225";
	}
	if (idName == "charlotte"){
	var biginfo = "4725 Piedmont Row Drive<br>Suite 170<br>Charlotte , NC - 28210<br>Tel: (704) 552-5502<br>Email : delfriscos.charlotte@steakco.com";
	var reservlink = "http://www.opentable.com/single.aspx?rid=12523&restref=12523";
	}
	if (idName == "dallas"){
	var biginfo = "5251 Spring Valley Road<br>Dallas , Texas - 75254<br>Tel: (972) 490-9000<br>Email : delfriscos.dallas@steakco.com";
	var reservlink = "http://www.opentable.com/single.aspx?rid=20254&restref=20254";
	}
	if (idName == "denver"){
	var biginfo = "8100 East Orchard Road<br>Greenwood Village , Colorado - 80111<br>Tel: (303) 796-0100<br>Email : delfriscos.denver@steakco.com";
	var reservlink = "http://www.opentable.com/single.aspx?rid=29572&restref=29572";
	}
	if (idName == "fort_worth"){
	var biginfo = "812 Main Street<br>Fort Worth , Texas - 76102<br>Tel: (817) 877-3999<br>Email : delfriscos.fortworth@steakco.com";
	var reservlink = "http://www.opentable.com/single.aspx?rid=26131&restref=26131";
	}
	if (idName == "houston"){
	var biginfo = "5061 Westheimer Rd<br>Suite 8060<br>Houston , TX - 77056<br>Tel: (713)-355-2600<br>Email : delfriscos.houston@steakco.com";
	var reservlink = "http://www.opentable.com/single.aspx?rid=18298&restref=18298";
	}
	if (idName == "las_vegas"){
	var biginfo = "3925 Paradise Road<br>Las Vegas , Nevada - 89169<br>Tel: (702) 796-0063<br>Email : delfriscos.lasvegas@steakco.com";
	var reservlink = "http://www.opentable.com/single.aspx?rid=31036&restref=31036";
	}
	if (idName == "new_york"){
	var biginfo = "1221 Avenue of the Americas<br>New York , New York - 10020<br>Tel: (212) 575-5129<br>Email : delfriscos.newyork@steakco.com";
	var reservlink = "http://www.opentable.com/single.aspx?rid=42265&restref=42265";
	}
	if (idName == "philadelphia"){
	var biginfo = "1426 Chestnut St.<br>Philadelphia , PA - 19102<br>Tel: (215) 246-0533<br>Email : delfriscos.philadelphia@steakco.com";
	var reservlink = "http://www.opentable.com/single.aspx?rid=28588&restref=28588";
	}
	//if (idName == "boston"){
	//var biginfo = "<br>Opening Spring 2011<br>";
	//}

	
	var alllocations = document.getElementById('thelocations');
var theholder = document.getElementById('cityinfo');
var newtitle = document.getElementById('infotitle');
var newinfo = document.getElementById('theinfo');
var newlinks = document.getElementById('thelinks');
var citypic = document.getElementById('citypic');
var hometext = document.getElementById('hometext');
	alllocations.style.display = "none";
	hometext.style.display = "none";
	theholder.style.display = "block";
	
	newtitle.innerHTML = "Del Frisco's of <span class=\"caps\">"+idName.replace("_"," ")+"</span>";
	newinfo.innerHTML =  biginfo;
	
	if(idName != "boston"){
	citypic.style.display = "block";
	newlinks.innerHTML = "<br><a href=\""+idName+"-map.php\"><img src=\"main-images/viewmap.jpg\" width=\"77\" height=\"14\" border=\"0\"></a> <a href=\""+idName+"-menu.php\"><img src=\"main-images/viewmenu.jpg\" width=\"77\" height=\"14\" border=\"0\"></a> <a href=\""+idName+"-details.php\"><img src=\"main-images/moreinfo.jpg\" width=\"77\" height=\"14\" border=\"0\"></a> <a href=\""+reservlink+"\"  target=\"_blank\"><img src=\"main-images/makereserv2.jpg\" width=\"96\" height=\"14\" border=\"0\"></a><br><br><a href=\"#\" onclick=\"closebox(); return false;\">< BACK TO LIST</a>";
	citypic.innerHTML = "<img src='main-images/locbkg/bkg-"+idName+".jpg' width='793px' height='504px'>";
	}else{
	newlinks.innerHTML = "<br><a href=\"#\" onclick=\"closebox(); return false;\">< BACK TO LIST</a>";
	}
	
}




	function closebox() {
	var alllocations = document.getElementById('thelocations');
	var theholder = document.getElementById('cityinfo');
	alllocations.style.display = "block";
	theholder.style.display = "none";
	citypic.style.display = "none";
	hometext.style.display = "block";
	
	}

	
	
}
