//*******************************************
//FULLSCREEN POPUP
//*******************************************
function OpenFullWindow(targeturl){
	window.open(targeturl,"","fullscreen")
}

//*******************************************
//POP-UP WINDOW
//*******************************************
function OpenBrWindow(theURL,winName,features) {
	Window = window.open(theURL,winName,features);
}

function checkLength(which){
	document.getElementById("lblCommentLen").innerHTML = "Total Length: " + which.value.length;
	if(which.value.length > which.limit-1) {
		return false;
	}else{
		return true;
	}
}

function display(myimage,title) {
	html = "" +
	"<HTML>\n" +
	"<HEAD>\n" + 
	"<TITLE>" + title + "</TITLE>\n" +
	"</HEAD>\n" + 
	"<BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>\n" +
	"<TABLE style='width:100%;height:100%'>\n" +
	"	<TR>\n" +
	"		<TD align=center><IMG SRC='" + myimage + "' BORDER=0 NAME=image onload='window.resizeTo(document.image.width+50,document.image.height+80)'></TD>\n" +
	"	</TR>\n" +
	"</TABLE>\n" +
	"</BODY>\n" + 
	"</HTML>\n";
	
	popup=window.open('','image','top=20,left=20,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
	popup.document.open();
	popup.document.write(html);
	popup.document.focus();
	popup.document.close()
}


function Confirmation(str){
	return confirm(str);
}

RollOff = new Array()
RollOn = new Array()
	
RollOff[0] = "images/navServicesOff.gif";
RollOff[1] = "images/navProductsOff.gif";
RollOff[2] = "images/navGalleryOff.gif";
RollOff[3] = "images/navAboutUsOff.gif";
RollOff[4] = "images/navContactUsOff.gif";

RollOn[0] = "images/navServicesOn.gif"; 
RollOn[1] = "images/navProductsOn.gif";
RollOn[2] = "images/navGalleryOn.gif";
RollOn[3] = "images/navAboutUsOn.gif";
RollOn[4] = "images/navContactUsOn.gif";

function swap(type,name,id){
	var obj = document.getElementById(name);
	if(type == 1){
		obj.src = RollOn[id];
	}else{
		obj.src = RollOff[id];
	}
}

function CreateArray(){
	var AllNames = Array('divHome','divProjects','divStrategy','divBlog','divAbout');
	var FinalArray = Array(AllNames.length);
	for(var i=0;i<AllNames.length;i++){
		FinalArray[i] = document.getElementById(AllNames[i]);
	}
	return FinalArray;
}


function show(num){
	for(var i=0;i<CreateArray().length;i++){
		var obj = CreateArray()[i];
		if(i == num){
			obj.style.display = 'block';
		}else{
			obj.style.display = 'none';
		}
	}
}

function FocusClear(which,str){
	if(which.value == str){
		which.value = "";
	}
}
function BlurClear(which,str){
	if(which.value == ""){
		which.value = str;
	}
}
function Restart(){
	//var theButtons = document.getElementById('divButtons');
	var theEmail = document.getElementById('divEmail');
	//var theMessage = document.getElementById('divMessage');
	
	//theButtons.style.display = 'none'
	theEmail.style.display = 'none'
	//theMessage.style.display = 'none'
}

function Toggle(layer){
	Restart();
	var theLayer = document.getElementById(layer);
	theLayer.style.display = (theLayer.style.display == "none" || theLayer.style.display == "") ? "block" : "none";
}

//**********************************************************************************// TABS Function//**********************************************************************************var divTabs = new Array('tabComment','tabPassAlong');var divWindows = new Array('divComments','divPassAlong');var imgComments = new Array('images/tabs/tabCommentOff.gif','images/tabs/tabCommentOn.gif');var imgPassAlong = new Array('images/tabs/tabPassAlongOff.gif','images/tabs/tabPassAlongOn.gif');function ToggleTabs(ID){	switch(ID){		case 0:			document.getElementById("tabComment").src = imgComments[1];			document.getElementById("tabPassAlong").src = imgPassAlong[0];			document.getElementById("divComments").style.display = 'block';			document.getElementById("divPassAlong").style.display = 'none';			break;				case 1:			document.getElementById("tabComment").src = imgComments[0];			document.getElementById("tabPassAlong").src = imgPassAlong[1];			document.getElementById("divComments").style.display = 'none';			document.getElementById("divPassAlong").style.display = 'block';			break;	}}function FullScreenDiv(url){	var div = document.getElementById("divFullScreen");	var shell = document.getElementById("divImageShell");	//div.style.visibility = "visible";		shell.style.visibility = "visible";		//shell.innerHTML = "<div id='divPhotoBorder'><img src='" + url + "' id='imgPhoto'></div>";			shell.style.top = 0;}