

<!--hide from javaless browsers

screenwidth= screen.width;
if (screenwidth==1024)
{
	addpixels = 114;
}
else
{
	addpixels = 0;
}



//this is the set up for the DHTML menus (ends on line 42)

   NS4 = (document.layers);
   IE4 = (document.all);
   ver4 = (NS4 || IE4);
   IE5 = (IE4 && navigator.appVersion.indexOf("5.")!=-1) || (IE4 && navigator.appVersion.indexOf("6.")!=-1);

isMac = (navigator.appVersion.indexOf("Mac") != -1);
isMenu = (NS4 || (IE4 && !isMac) || (IE5 && isMac));


function popUp(){return};
function popDown(){return};

if (!ver4) event=null;

if (isMenu) {
menuVersion = 3;
menuWidth = 200;
childOverlap = 0;
childOffset = 0;
perCentOver = null;
secondsVisible = .5;
fntCol = "#003366";
fntCol1= "#666666";
// Minimum size for NS-Mac to display bolding: 11pt
// Minimum size for NS-Win to display bolding: 9pt
// Minimum size for IE-any to display bolding: 8pt
fntSiz = "8"; // Default
if ((NS4) && (isMac))   { fntSiz = "8";} // NS for Mac
if ((!NS4) && (isMac))  { fntSiz = "8";}  // IE for Mac
if ((NS4) && (!isMac))  { fntSiz = "8";}  // NS for Win
if ((!NS4) && (!isMac)) { fntSiz = "8";}  // IE for Win
//alert("The Font Size is: "+fntSiz);
fntBold = false;
fntItal = false;
fntFam = "arial, verdana,arial";
backCol = "#ffffff";
overCol = "#D1E0F0";
overCol1 = "#FFFFFF";
overFnt = "#ffffff";
overFnt1 = "#666666";

borWid = 1;
borCol = "#336699";
borSty = "solid";
itemPad = 2;
imgSrc = "";
imgSiz = 8;
separator = 1;
separatorCol = "#336699";
isFrames = false;
keepHilite = true;
clickStart = false;
clickKill = false;
}
// This is the array for the DHTML menu (ends on line 140)
if (isMenu) {
arMenu1 = new Array(
75,
705,100,
"","",
"","",
"","",
"Email","mailto:specialspine@specialspine.com",1,
"Map","#",1
);

arMenu2 = new Array(
130,
122,100,
"","",
"","",
"","",
"Kenneth K Hansraj, M.D.","/surgicalservices/kkh.asp",1,
"Ziad Elie Abouezzi, M.D.","/surgicalservices/ziad.asp",1,
"Sohail Safdari, RPA-C","/surgicalservices/sohail_safdari.asp",1
);

arMenu3 = new Array(
150,
238,100,
"","",
"","",
"","",
"Patients Self Referral Form","/forms/patient_referral.asp",1,
"Physician Referral Form","/forms/physician_referral.asp",1,
"Spinal Patient Intake Form","/forms/fullintake.asp",1
);

arMenu4 = new Array(
120,
288,100,
"","",
"","",
"","",
"Societies / Specialties","/spinelinks/societies.asp",1,
"Publications / Journals","/spinelinks/publications.asp",1,
"Government","/spinelinks/government.asp",1,
"Companies","/spinelinks/companies.asp",1
);

arMenu5 = new Array(
150,
370,100,
"","",
"","",
"","",
"Accupuncturist","/practitioners/accupuncturist.asp",1,
"Internal Medicine Specialists","/practitioners/internal.asp",1,
"Neuroradiology","/practitioners/neuroradiology.asp",1,
"Neurologists","/practitioners/neurologists.asp",1,
"Orthopedic Surgeons","/practitioners/orthopedic_surgeons.asp",1,
"Pain Management Specialists","/practitioners/pain_management.asp",1,
"Physiatrists","/practitioners/physiatrists.asp",1,
"Spinal Evalutions","/practitioners/spinal_evalutions.asp",1,
"Travel Health Consultant","/practitioners/travelhealth_consultant.asp",1,
"Urologist","/practitioners/urologist.asp",1
);

arMenu6 = new Array(
240,
525,100,
"","",
"","",
"","",
"Center for Physical Therapy","/therapists/center.asp",1,
"DePetro Physical Therapy","/therapists/depetro.asp",1,
"DiStefano Physical Therapy","/therapists/distefano.asp",1,
"Fitness Forum","/therapists/fitness.asp",1,
"Lancellotti Physical Therapy","/therapists/lancellotti.asp",1,
"Milbrook Orthopedic & Sports Physical Therapy","/therapists/milbrook.asp",1,
"Peak Physical Therapy","/therapists/peak.asp",1,
"Pleasant Valley Physical Therapy","/therapists/pleasant.asp",1,
"Sports & Physical Medicine Center","/therapists/sports.asp",1,
"St. Francis Therapists","/therapists/francis.asp",1,
"Montgomery Physical Therapy & Wellness","/therapists/montgomery.asp",1,
"Port Jervis Physical Therapy & Wellness","/therapists/portjervis.asp",1,
"Phyllis Moriarity","/therapists/physical_therapist.asp",1,
"Vails Gate Physical Therapy","/therapists/vails.asp",1
);

}

//this is the engine for the DHTML menus (ends on line 600)

if (isMenu) {
loader = window;
loader.onload = startIt;
if(NS4){
	origWidth = loader.innerWidth;
	origHeight = loader.innerHeight;
	loader.onresize = reDo;
}
isLoaded = false;
NSresized = false;
if (!window.menuVersion) {keepHilite = clickStart = false;}
if (!window.imgHspace) imgHspace=0;
isWin = (navigator.appVersion.indexOf("Win") != -1)
mSecsVis = secondsVisible*1000;
areCreated = false;
menuLoc = null;
function initVars() {
	if(areCreated) {
		for(i=1; i<topCount; i++) {
			cur = eval("elMenu"+i);
			clearTimeout(cur.hideTimer);
			cur.hideTimer=null;
		}
		clearTimeout(allTimer);
	}
	topCount = 1;
	areCreated = false;
	beingCreated = false;
	isOverMenu = false;
	currentMenu = null;
	allTimer = null;
}
initVars();
}
function startIt() {
	isLoaded = true;
	menuLoc = window;
	menuLoc.nav = nav = window;
	makeTop();
}
function makeTop(){
	beingCreated = true;
	if(IE4) {
		topZ = 0;
		for (z=0;z<window.document.all.length;z++){
			oldEl = window.document.all(z);
			topZ = Math.max(oldEl.style.zIndex,topZ)
		}
	}
	while(eval("window.arMenu" + topCount)) {

		(NS4) ? makeMenuNS(false,topCount) : makeMenuIE(false,topCount);
		topCount++
	}

	//status = (topCount-1) + " Hierarchical Menu Trees Created"
	status = ""
	document.close();
	areCreated = true;
	beingCreated = false;
//	trace("Load time (milliseconds)");
}
function makeMenuNS(isChild,menuCount,parMenu,parItem) {
	tempArray = eval("arMenu" + menuCount);
	tempWidth = tempArray[0] ? tempArray[0] : menuWidth;
	menu = makeElement("elMenu" + menuCount,tempWidth,null,null);
	menu.array = tempArray;
	menu.setMenuTree = setMenuTree;
	menu.setMenuTree(parMenu);
	while (menu.itemCount < menu.maxItems) {
		menu.itemCount++;
		prevItem = (menu.itemCount > 1) ? menu.item : null;
		itemName = "item" + menuCount + "_" + menu.itemCount;
		menu.item = makeElement(itemName,null,null,menu);
		menu.item.prevItem = prevItem;
		menu.item.setup = itemSetup;
		menu.item.setup(menu.itemCount,menu.array);
	}
	menu.lastItem = menu.item;
	menu.setup(isChild,parMenu,parItem);
}

function setMenuTree(parMenu) {
	this.menuWidth = this.array[0] ? this.array[0] : menuWidth;
	this.menuLeft = this.array[1];
	this.menuTop = this.array[2];
	this.menuFontColor = this.array[3] ? this.array[3] : fntCol;
	this.menuFontColor1 = this.array[3] ? this.array[3] : fntCol1;
	this.menuFontOver = this.array[4] ? this.array[4] : overFnt;
	this.menuFontOver1 = this.array[4] ? this.array[4] : overFnt1;
	this.menuBGColor = this.array[5] ? this.array[5] : backCol;
	this.menuBGOver = this.array[6] ? this.array[6] : overCol;
	this.menuBGOver1 = this.array[6] ? this.array[6] : overCol1;
	this.menuBorCol = this.array[7] ? this.array[7] : borCol;
	this.menuSeparatorCol = this.array[8] ? this.array[8] : separatorCol;
	this.treeParent = this;
	this.startChild = this;
	this.maxItems = (this.array.length-9)/3;
	this.hasParent = null;
	this.setup = menuSetup;
	this.itemCount = 0;
}

function makeMenuIE(isChild,menuCount,parMenu) {
	menu = makeElement("elMenu" + menuCount);
	menu.array = eval("arMenu" + menuCount);
	menu.setMenuTree = setMenuTree;
	menu.setMenuTree(parMenu);
	menu.itemStr = "";
	while (menu.itemCount < menu.maxItems) {
		menu.itemCount++;
		itemName = "item" + menuCount + "_" + menu.itemCount;
		arrayPointer = ((menu.itemCount-1)*3)+9;
		dispText = menu.array[arrayPointer];
		if(IE5) {
			newSpan = window.document.createElement("SPAN");
			with(newSpan) {
				id = itemName;
				with(style) {
					width = (menu.menuWidth-(borWid*2));
					fontSize = fntSiz + "pt";
					fontWeight = (fntBold) ? "bold" : "normal";
					fontStyle = (fntItal) ? "italic" : "normal";
					fontFamily = fntFam;
					padding = itemPad;
					borderBottomWidth = separator + "px";
					borderBottomStyle = "solid";
					textalign ="center";
				}
				innerHTML = dispText;
			}
			//newBreak = menuLoc.document.createElement("BR");
			menu.appendChild(newSpan);
			//menu.appendChild(newBreak); // opening the page twice?
		} else
		{
			htmStr = dispText;
			menu.itemStr += "<SPAN ID=" + itemName + " STYLE=\"width:" + (menu.menuWidth-(borWid*2))+"  ;";
			menu.itemStr += "font-size:"+fntSiz+"pt;";
			menu.itemStr += "font-weight:"+((fntBold) ? "bold;" : "normal;");
			menu.itemStr += "font-style:"+((fntItal) ? "italic;" : "normal;");
			menu.itemStr += "font-family:"+fntFam+";";
			menu.itemStr += "padding:"+itemPad+"px;";
			menu.itemStr += "border-bottom-width:"+separator+"px;";
			menu.itemStr += "border-bottom-style:solid;text-align:center";
			menu.itemStr += "\">" + htmStr + "</SPAN><BR>";
		}
	}
	if(!IE5) menu.innerHTML = menu.itemStr; // IE 4's method was faster
	itemColl = menu.children.tags("SPAN");
	for (i=0; i<itemColl.length; i++) {
		it = itemColl(i);
		it.setup = itemSetup;
		it.setup(i+1,menu.array);
	}
	menu.lastItem = itemColl(itemColl.length-1);
	menu.setup(isChild,parMenu);
}
function makeElement(whichEl,whichWidth,whichParent,whichContainer) {
	if (NS4) {
		if (whichWidth) {
			elWidth = whichWidth;
		} else {
			elWidth = (whichContainer) ? whichContainer.menuWidth : whichParent.menuWidth;
			if (whichContainer) elWidth = elWidth-(borWid*2)-(itemPad*2);
		}
		if (!whichContainer) whichContainer = window;
		eval(whichEl + "= new Layer(elWidth,whichContainer)");
	} else {
		if (IE5) {
			newDiv = window.document.createElement("DIV");
			newDiv.style.position = "absolute";
			newDiv.id = whichEl;
			window.document.body.appendChild(newDiv);
		} else {
			elStr = "<DIV ID=" + whichEl + " STYLE='position:relative'></DIV>";
			//window.document.body.insertAdjacentHTML("BeforeEnd",elStr);
			window.document.body.insertAdjacentHTML("beforeEnd",elStr);
		}
	}
	return eval(whichEl);
}

function itemSetup(whichItem,whichArray) {
	this.onmouseover = itemOver;
	this.onmouseout = itemOut;
	this.container = (NS4) ? this.parentLayer : this.parentElement;
	arrayPointer = (this.container.hasParent) ? (whichItem-1)*3 : ((whichItem-1)*3)+9;
	this.dispText = whichArray[arrayPointer];
	this.linkText = whichArray[arrayPointer + 1];
	this.linktrue = whichArray[arrayPointer+2]
	if (this.linkText) {
		if (NS4) {
			this.captureEvents(Event.MOUSEUP)
			this.onmouseup = linkIt;
		} else {
			this.onclick = linkIt;
			this.style.cursor = "hand";
		}
	}
	if (NS4) {
		htmStr = this.dispText;
		if (fntBold) htmStr = htmStr.bold();
		if (fntItal) htmStr = htmStr.italics();
		htmStr = "<FONT FACE='" + fntFam + "' POINT-SIZE=" + fntSiz + ">" + htmStr+ "</FONT>";
			if  (this.linktrue ==1){
			this.htmStr = htmStr.fontcolor(this.container.menuFontColor);
			}
			else{
			this.htmStr = htmStr.fontcolor(this.container.menuFontColor1);
			}
		this.visibility = "inherit";
		this.bgColor = this.container.menuBGColor;
		if (whichItem == 1) {
			this.top = borWid + itemPad;
		} else {
			this.top = this.prevItem.top + this.prevItem.clip.height + separator;
		}
		this.left = borWid + itemPad;
		this.clip.top = this.clip.left = -itemPad;
		this.clip.right = this.container.menuWidth-(borWid*2)-itemPad;
		maxTxtWidth = this.container.menuWidth-(borWid*2)-(itemPad*2);
		this.txtLyrOff = new Layer(maxTxtWidth,this);
		this.txtLyrOff.document.write(this.htmStr);
		this.txtLyrOff.document.close();
		this.txtLyrOff.visibility = "inherit";
		this.clip.bottom = this.txtLyrOff.document.height+itemPad;
	} else {
		with (this.style) {

			if  (this.linktrue ==1){
			color = this.container.menuFontColor;
			overcolor = this.container.menuFontOver;
			}
			else{
			color = this.container.menuFontColor1;
			overcolor = this.container.menuFontOver1;
			}

			borderBottomColor = this.container.menuSeparatorCol;
			backgroundColor = this.container.menuBGColor;

		}
	}
}
function menuSetup(hasParent,openCont,openItem) {
	this.onmouseover = menuOver;
	this.onmouseout = menuOut;
	this.showIt = showIt;
	this.keepInWindow = keepInWindow;
	this.hideTree = hideTree
	this.hideParents = hideParents;
	this.hideTop = hideTop;
	this.hasChildVisible = false;
	this.isOn = false;
	this.hideTimer = null;
	this.childOverlap = (perCentOver != null) ? ((perCentOver/100) * this.menuWidth) : childOverlap;
	this.currentItem = null;
	this.hideSelf = hideSelf;
	this.hasParent = false;
	if (NS4) {
		this.bgColor = this.menuBorCol;
		this.fullHeight = this.lastItem.top + this.lastItem.clip.bottom + borWid;
		this.clip.right = this.menuWidth;
		this.clip.bottom = this.fullHeight;
	} else {
		with (this.style) {
			width = this.menuWidth;
			borderWidth = borWid;
			borderColor = this.menuBorCol;
			borderStyle = borSty;
			zIndex = topZ;
			overflow = "hidden";
		}
		this.lastItem.style.border="";
		this.fullHeight = this.offsetHeight;
		if(isMac)this.style.pixelHeight = this.fullHeight;
		this.fullHeight = this.scrollHeight;
		this.showIt(false);
		this.onselectstart = cancelSelect;
		this.moveTo = moveTo;
		this.moveTo(0,0);
//		alert("this.style.pixelHeight = "+this.style.pixelHeight+"\nthis.offsetHeight = "+this.offsetHeight);
	}
}
function popUp(menuName,e,menuno){

	var menuno1 = menuno;
	if (NS4 && NSresized) startIt();
	//if (!isLoaded) return;
	linkEl = (NS4) ? e.target : event.srcElement;
	if (clickStart) linkEl.onclick = popMenu;
	if (!beingCreated && !areCreated) startIt();
	linkEl.menuName = menuName;
	if (!clickStart) popMenu(e,menuno1);
}

function popMenu(e,menuno){
	if (!isLoaded || !areCreated) return true;
	eType = (NS4) ? e.type : event.type;
	hideAll();
	linkEl = (NS4) ? e.target : event.srcElement;
	currentMenu = eval(linkEl.menuName);
	currentMenu.hasParent = false;
	currentMenu.treeParent.startChild = currentMenu;
	if (IE4) menuLocBod = window.document.body;
	xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (NS4) ? e.pageX : (event.clientX + menuLocBod.scrollLeft);
	yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (NS4) ? e.pageY : (event.clientY + menuLocBod.scrollTop);
	currentMenu.moveTo(xPos,yPos);
	currentMenu.keepInWindow()
//	alert("currentMenu.keepInWindow = "+currentMenu.keepInWindow);
	currentMenu.isOn = true;
	currentMenu.showIt(true);
	return false;
}
function menuOver(e) {
	this.isOn = true;
	isOverMenu = true;
	currentMenu = this;
	if (this.hideTimer) clearTimeout(this.hideTimer);
}
function menuOut() {
	if (IE4) {
		theEvent = window.event;
		if (theEvent.srcElement.contains(theEvent.toElement)) return;
	}
	this.isOn = false;
	isOverMenu = false;
	allTimer = setTimeout("currentMenu.hideTree()",10);
}
function itemOver(){
	if (keepHilite) {
		if (this.container.currentItem && this.container.currentItem != this) {
			if (NS4) {
					this.container.currentItem.bgColor = this.container.menuBGColor;
			} else {
				with (this.container.currentItem.style) {

					if (this.linktrue==1){
					backgroundColor = this.container.menuBGColor;
				//	color = this.container.menuFontColor1;
					}
					else{
						backgroundColor = this.container.menuBGColor;
				//		color = this.container.menuFontColor;
					}
				}
			}
		}
	}
	if (IE4) {
		theEvent = window.event;
		if (theEvent.srcElement.tagName == "IMG") return;
		//this.style.backgroundColor = this.container.menuBGOver;
			if (this.linktrue==1){
				this.style.backgroundColor = this.container.menuBGOver;
				//this.style.color = this.container.menuFontOver;
			}
			else{
				this.style.backgroundColor = this.container.menuBGOver1;
				//this.style.color = this.container.menuFontOver1;
			}
	} else {
			if (this.linktrue==1){
				this.bgColor = this.container.menuBGOver;
			}
			else{
				this.bgColor = this.container.menuBGOver1;
			}
	}
	this.container.currentItem = this;
}
function itemOut()
{
	if (IE4) {
		theEvent = window.event;
		 if (theEvent.srcElement.contains(theEvent.toElement)
	  || (theEvent.fromElement.tagName=="IMG" && theEvent.toElement.contains(theEvent.fromElement)))
		  return;
		if (!keepHilite) {
					this.style.backgroundColor = this.container.menuBGColor1;
					this.style.color = this.container.menuFontColor;
		}
		if (keepHilite) {
					this.style.backgroundColor = this.container.menuBGColor;

					if (this.linktrue==1){
					this.style.color = this.container.menuFontColor;
					}else{
					this.style.color = this.container.menuFontColor1;
					}

		}

	} else {
		if (!keepHilite) {
				this.bgColor = this.container.menuBGColor;
		}
		if (!isOverMenu) {
			allTimer = setTimeout("currentMenu.hideTree()",10);
		}
	}
}

function moveTo(xPos,yPos) {
	this.style.pixelLeft = xPos+addpixels-3;
	this.style.pixelTop = yPos;
}
function showIt(on) {
	if (NS4) {
		this.visibility = (on) ? "show" : "hide";
		if (keepHilite && this.currentItem) {
			this.currentItem.bgColor = this.menuBGColor;

		}
	} else {
		this.style.visibility = (on) ? "visible" : "hidden";
		if (keepHilite && this.currentItem) {
			with (this.currentItem.style) {
				backgroundColor = this.menuBGColor;
				color = this.menuFontColor;
			}
		}
	}
	this.currentItem = null;
}
function keepInWindow() {
	botScrBar = 5;
	if (NS4) {
		winBot = (window.pageYOffset + window.innerHeight) - botScrBar ;
		botPos = this.top + this.fullHeight;
	} else {
		winBot = (window.document.body.scrollTop + window.document.body.clientHeight) - botScrBar;
		botPos = this.style.pixelTop + this.fullHeight;
	}
	if (botPos > winBot) {
		dif = botPos - winBot;
		(NS4) ? (this.top -= dif) : (this.style.pixelTop -= dif);
	}
//	status = ("this.style.pixelTop = "+ this.style.pixelTop +", botPos = "+ botPos);
}
function linkIt() {
	if (this.linkText.indexOf("javascript:")!=-1) eval(this.linkText)
	//else window.location.href = this.linkText;
	// used 'self' 2 keep the URL intact - iGates ;-)
	 else window.self.location.href = this.linkText;

}
function popDown(menuName,onname){
	if (!isLoaded || !areCreated) return;
	whichEl = eval(menuName);
	setTimeout("whichEl.hideTop();whichEl.isOn = false;",10);
}
function hideAll() {
	for(i=1; i<topCount; i++) {
		temp = eval("elMenu" + i + ".startChild");
		temp.isOn = false;
		temp.showIt(false);
	}
}
function hideTree() {
	allTimer = null;
	if (isOverMenu) return;
	this.hideParents();
}
function hideTop() {
	whichTop = this;
	this.hideTimer = setTimeout("if(whichTop.hideSelf)whichTop.hideSelf()",mSecsVis);
}
function hideSelf() {
	this.hideTimer = null;
	if (!this.isOn && !isOverMenu) {
		this.showIt(false);
	}
}
function hideParents() {
	tempMenu = this;
	while (tempMenu.hasParent) {
		tempMenu.showIt(false);
		tempMenu.parentMenu.isOn = false;
		tempMenu = tempMenu.parentMenu;
	}
	tempMenu.hideTop();
}
function cancelSelect(){return false}
function reDo(){
	if (loader.innerWidth==origWidth && loader.innerHeight==origHeight) return;
	initVars();
	NSresized=true;
	window.location.reload();
}
function clicked() {
	if (!isOverMenu && currentMenu!=null && !currentMenu.isOn) {
		whichEl = currentMenu;
		whichEl.hideTree();
	}
}
//window.onerror = handleErr;
function handleErr(){
	arAccessErrors = ["permission","access"];
	mess = arguments[0].toLowerCase();
	found = false;
	for (i=0;i<arAccessErrors.length;i++) {
		errStr = arAccessErrors[i];
		if (mess.indexOf(errStr)!=-1) found = true;
	}
	return found;
}
//end




//-->
