var prvlink='business';
var preDiv='div_business';

function include_file(id, url) {
	
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
  if (req) {
    // Synchronous request, wait till we have it all
	req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } 
}

function holdlink(id)
	{
		document.getElementById(id).onmouseout='selected_link';
	 	document.getElementById(id).className='selected_link';
	}

function setLink(id)
	{
		document.getElementById(prvlink).className='gallery';
	 	document.getElementById(id).className='gallery_hold';
		prvlink=id;
	}
	
function showGallery (id)
	{
		document.getElementById(preDiv).style.display='none';
		document.getElementById(id).style.display='';
		preDiv=id;
	}
	
function request_info()
	{
		var NewWin;
		NewWin1=window.open("request_info.htm",'NewWin2','height=480,width=420,top=30,left=50,location=no,status=no,toolbar=no,menubar=no,scrollbars=no');
		NewWin1.focus();
	}
	
	
	function trim(inputString) 
{
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   
   while (ch == " ") { 
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { 
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { 
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
   }
   return retValue;
}

/*--------------Project Gallery Functions--------------*/

var msg = Object;
/*--------------Business Titles--------------*/
msg['1'] = 'Hamilton Government Services Center, Hamilton, Ohio - 1999';
msg['2'] = 'Givaudan Office and Laboratory, Cincinnati, Ohio - 2004';
msg['3'] = 'Dolwick Business Center, Hebron, Kentucky - 2003';
msg['4'] = 'Baldwin Office Building and Humana Offices, Cincinnati, Ohio - 2008';
msg['5'] = 'West Chester Safety Campus, West Chester, Ohio - 2008';
msg['6'] = 'Summit Woods Office Building, Sharonville, Ohio – 2006';

/*--------------Retail Titles--------------*/
msg['7'] = 'Meijer - Colerain, Cincinnati, Ohio - 2007';
msg['8'] = 'Meijer - Dent, Cincinnati, Ohio - 2001';
msg['9'] = 'Meijer - Oakley, Cincinnati, Ohio - 2001';
msg['10'] = 'Anderson Towne Center, Cincinnati, Ohio - 2004';
msg['11'] = 'Lowes – Harrison Avenue, Cincinnati, Ohio - 2007';
msg['12'] = 'Kroger - Whitewater Township, Ohio - 2002';

/*--------------Hotel/Restaurant Titles--------------*/
msg['13'] = 'Hampton Inn, West Chester, Ohio - 2006';
msg['14'] = 'Courtyard by Marriot, West Chester, Ohio - 2007';
msg['15'] = 'The Cheesecake Factory, Kenwood, Ohio - 2005';
msg['16'] = 'McCormick & Schmicks, Cincinnati, Ohio - 2006';
msg['17'] = 'Eddie Merlots, Montgomery, Ohio - 2007';

/*--------------Retail Titles--------------*/
msg['18'] = 'The Ascent, Covington, Kentucky - 2008';
msg['19'] = 'Captains Watch, Cincinnati, Ohio - 2007';
msg['20'] = 'The American Building, Cincinnati, Ohio – 2005';
msg['21'] = 'Twin Lakes, Montgomery, Ohio - 2005';
msg['22'] = 'Lincoln Court, Cincinnati, Ohio – 2004';
msg['23'] = 'The Lofts at Shillato, Cincinnati, Ohio – 1999';
msg['24'] = 'Roebling Row, Covington, Kentucky – 2000';

/*--------------Education Titles--------------*/
msg['25'] = 'Ross High School, Ross, Ohio - 2005';
msg['26'] = 'Pleasant Ridge Montessori, Cincinnati, Ohio - 2008';
msg['27'] = 'Carson Elementary School, Cincinnati, Ohio - 2008';
msg['28'] = 'Seton High School, Cincinnati, Ohio - 2006';
msg['29'] = 'Lakota East High School, West Chester, Ohio - 1996';
msg['30'] = 'Lakota West High School, West Chester, Ohio - 1996';

/*--------------Senior Living Titles--------------*/
msg['31'] = 'Knolls Of Oxford, Oxford, Ohio - 2001';
msg['32'] = 'Twin Towers, Cincinnati, Ohio - 2000';
msg['33'] = 'Glendale Care Center, Glendale, Ohio - 2005';
msg['34'] = 'Stratford of Kenwood, Maderia, Ohio - 2008';

/*--------------Medical Titles--------------*/
msg['35'] = 'Beacon Orthopedics West, Cincinnati, Ohio - 2006';
msg['36'] = 'Beacon Orthopedics, Sharonville, Ohio - 2001';
msg['37'] = 'Red Bank Road Plastic Surgery Center, Cincinnati, Ohio - 2003';

/*--------------Other Notable Project Titles--------------*/
msg['38'] = 'Kentucky Speedway, Sparta, Kentucky - 2000';
msg['39'] = 'Performance Lexus, Cincinnati, Ohio - 2007';
msg['40'] = 'Cincinnati Zoo Giraffe Exhibit - 2008';
msg['41'] = 'Cincinnati Zoo Educational Center - 2006';
msg['42'] = 'Mt. St. Joe Stadium, Cincinnati, Ohio - 2004';

function getElement(id) {
return document.getElementById ? document.getElementById(id) :
document.all ? document.all(id) : null;
}

function titleChange(which, state, textCellId) {
	var el = getElement(textCellId);
	if (el && typeof el.innerHTML != 'undefined') {
	if (state == 'on') el.innerHTML = msg[which];
	}
}




function changeImg(path) {
	if(document.getElementById('bigimg').src!=path) {
	imgPreloader = new Image();
	
	// once image is preloaded, resize image container
	document.getElementById('bigimg').style.display="none";
	document.getElementById('loading_img').style.display="";
	imgPreloader.onload=function(){
	document.getElementById('loading_img').style.display="none";
	document.getElementById('bigimg').src=path;
	//document.getElementById('bigimg').style.display="";
	new Effect.Appear('bigimg',{ duration: 0.7, from: 0.0, to: 1.0});
	imgPreloader.onload=function(){};
	imgPreloader.src="";
	}
	imgPreloader.src=path;
	}
}

function show(id,cal_id){ 
	var id = id;
	var cal_id = cal_id;

	if(document.getElementById(id).style.display==''){ 
		document.getElementById(id).style.display='none';
		if(cal_id!="") {
			document.getElementById("desc_"+cal_id).style.display='';
		}
		
		document.getElementById(id+'_readmore').style.display='';
		document.getElementById(id+'_hidedetails').style.display='none';
	}else{ 
		if(document.getElementById(id).style.display == 'none')
		{ 
			if(cal_id!="") {
				document.getElementById("desc_"+cal_id).style.display='none';
			}
			document.getElementById(id).style.display=''; 
		}
		document.getElementById(id+'_readmore').style.display='none';
		document.getElementById(id+'_hidedetails').style.display='';
	}
}