var w3c = (document.getElementById) ? 1:0;
var ns4 = (document.layers) ? 1:0;
var ie4 = (document.all) ? 1:0;
if(ns4)window.onResize=rI;function rI(){window.history.go(0);}

var whichPage = window.location.href;

function strPath(){

	var baseTitle = document.title;
	var thisTitle = baseTitle.split(" :: ");

	var tempLoc = whichPage;
	tempLoc = tempLoc.replace(/(\w+):\/\/([\w.]+)\//, "");
	
	var strPath = '';
	
	var loc = tempLoc.split("/");
	
	// alert(loc.length);
	
	switch (loc.length){
		case 0,1:
			if(thisTitle[thisTitle.length - 1] != "Bayridge Heating & Air Conditioning"){
				strPath = '<a href="" class="pathHome">Home<\/a> : <span class="pathEnd">' + thisTitle[thisTitle.length - 1] + '<\/span>';
			}else{
				strPath = '<span class="pathEnd">Home<\/span>';	
			}
			break;
		case 2:
			if(loc[1] == ""){
				strPath = '<a href="/index.html" class="pathHome">Home<\/a> : <span class="pathEnd">' + thisTitle[thisTitle.length - 1] + '<\/span>';
			}else{
				strPath = '<a href="/index.html" class="pathHome">Home<\/a> : <a href="/' + loc[0] + '/" class="pathMiddle">' + thisTitle[thisTitle.length - 2] + '<\/a> : <span class="pathEnd">' + thisTitle[thisTitle.length - 1] + "<\/span>";
			}
			
			break;
	}
	
	return strPath;
}

function printWin(which){
	if(which.indexOf("&") != -1){
		var tempArray = which.split("&");
		var l = tempArray[0];
		var d = tempArray[1];
		var fileName = "print.asp?l=" + l + "&d=" + d;
	}else{
		var fileName = "print.asp?x=" + which;
	}
	
	x = window.open(fileName,"printWin","scrollbars=yes,menubar=yes,width=612,height=792");
	document.frmToolbox.toolSelect.selectedIndex = 0;
	x.focus();
}

function openWin(pg,n,w,h){
	if(w != "" && h != ""){
		d = window.open(pg,n,"scrollbars=yes,top=0,left=0,width="+w+"px,height="+h+"px");
	}else{
		d = window.open(pg,n,"scrollbars=yes,top=0,left=0,");
	}
}
