	
	var popupPrintWindow = null;
	
	function getObjectHeight( divobj ){

			var height = 0;
		
			if ( !divobj ){
				alert("error");
			}
		
			if(divobj.offsetHeight){ 	
		
				height = divobj.offsetHeight;
				
			}else if(divobj.style.pixelHeight){ 	
				height = divobj.style.pixelHeight;
			}
		
			else if(divobj.style.height){ 	
				height = divobj.style.height;
			}
		
			//alert( "height is " + height );
		
			return height;
  }

  /* Enlarge right column, to make it expand all the way down (to the footer) 
  	 
  */
  
function enlargeRightColumn(){

     

		
	  var barkergroup = "barkergroupdrill";
	  var ishomepage = false;
	  
	  if ( arguments.length >= 1 ) {
		  barkergroup = arguments[0];
	  }
	  
	  var toppadd = 270;  //the logic below will only work if the 
							    //main content is at least this value in height
	  var error = 0;
	  
	  var div_to_grow = "dummybarker";
	  
	  
	  if ( barkergroup == "barkergroup1"){
		  ishomepage = true;
	  }
	  
	  if ( ishomepage ) {
		  toppadd = 318;
		  error = -48;
	  }
	  
	  
	  //alert("will enlarge " +  div_to_grow );
	  
	  //alert('will enlarge: ' +   barkergroup );
	  
			//2 things to change
			var div1 = document.getElementById( div_to_grow );
			var div2 = document.getElementById( barkergroup );
		
			var dummbarkerheight = 271;   //dummy barker height
			var extra_height = 0;
			

			if ( div1 ) {

				//get the main text column of the page
				var tablecenter = document.getElementById("columncenter");

				if ( tablecenter ) {
					var aheight = getObjectHeight(tablecenter);
					if ( aheight > toppadd ){
						
						
						div1.style.display="block";
						
						if ( ishomepage ) {
						
							var barker3_div = document.getElementById("barker3");
							if ( barker3_div){
								barker3_div.style.borderBottom = "1px solid #ccd8a7";
							}
						}
						
						//alert("Height is " + aheight );
						aheight = aheight - toppadd;
						aheight += extra_height;


						//cristhian 06132007: decrease the increment a little to get rid of weird extra vertical lines
						//dummbarkerheight = dummbarkerheight - 5;

						div1.style.height =  aheight+ "px";					
						div2.style.height =  (aheight+dummbarkerheight-error)+ "px";					 //barker group
						
					}
				}else{
							//alert("not found2");					
					}
			}else{
				//alert("not found1");
			}
		 
  }


   function initDrillPage(){
	   		enlargeRightColumn();

   }
   
   
   
   function openPrintWindow( url ) {
	  	
			//var nWidth = 620;
			var nWidth = 650;
			var nHeight = 650;
			var x = (screen.width - nWidth) / 3;
			var y = (screen.height - nHeight) / 3;		

			var optionString = "scrollbars=yes,location=no,resizable=yes,status=no,";
			optionString += "height=" + nHeight + ",width=" + nWidth;
			optionString += ",screenX="+ x +",screenY="+ y +",top="+ y +",left="+ x;

		    if (! popupPrintWindow || popupPrintWindow.closed ) {
		    	popupPrintWindow = window.open(url,"windowPrintView",optionString);
		    } else {
		    	// window already exists, so bring it forward
			    popupPrintWindow.location.href=url;
			    popupPrintWindow.focus();
			}
	}


	
/* Heart beat digital - april 10th 2007 new functions declaration */



/* For directions collapsable menus - Contact us section */

function showdir1( prefix ,flag){
	var d1 = document.getElementById( prefix + "a" );
	var d2 = document.getElementById( prefix + "b" );
	var info = document.getElementById( prefix );
	common_showObject( d1, !flag );
	common_showObject( d2, flag );
	common_showObject( info,flag);

}

function common_showObject ( obj, flag ) {
	if (!obj){
		return;
	}
	
	if ( flag )
	{	
		obj.style.display = "block";
	}else{
		obj.style.display = "none";
	}
}


function common_showDocMoreBio1( flag ){
	var obj = 	 	document.getElementById("docmoreinfo1" );
	var plus =   document.getElementById("docmoreinfoplus");
	var minus =  document.getElementById("docmoreinfominus");
 	var bottominfo = document.getElementById("bottomdoctorinfo1");
	if (!obj)
	{
		return;
	}
	if (flag)
	{
	
		
		obj.style.display = "block";
		plus.style.display = "none";
		minus.style.display = "block";
		bottominfo.style.paddingLeft = "0px";
		enlargeRightColumn();

	}else{
		obj.style.display = "none";
		plus.style.display = "block";
		minus.style.display = "none";
		bottominfo.style.paddingLeft = "77px";
		enlargeRightColumn();

	}

}

function processServiceDropdown1(){

	var dd = document.getElementById('departmentlist');
	//alert(dd.value);
	if (dd.value != "")
	{
			window.location = dd.value;
	}

}



function addEvent(obj, evType, fn){


 if (obj.addEventListener){
    obj.addEventListener(evType, fn, true);
    return true;
 } else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
 } else {
    return false;
 }
}
function removeEvent(obj, evType, fn, useCapture){
  if (obj.removeEventListener){
    obj.removeEventListener(evType, fn, useCapture);
    return true;
  } else if (obj.detachEvent){
    var r = obj.detachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Handler could not be removed");
  }
}


addEvent(window, "load", adddropdown1);


function department1( name, link ) {
	this.name = name;
	this.link = link;
}


var listdep1 = new Array();

listdep1.push(new department1('Anesthesiology','deptsandservices/anesthesiology.html') );
listdep1.push(new department1('Arrhythmia & Pacemaker Center','deptsandservices/cardiology/arrhythmia.html'));
listdep1.push(new department1('Breast Surgery','deptsandservices/breastsurgery.html'));
listdep1.push(new department1('Cardiac Diagnostic Imaging','deptsandservices/cardiology/diagnosticimaging.html'));
listdep1.push(new department1('Cardiac Fitness & Rehabilitation','deptsandservices/cardiology/cardiacfitnessrehab.html'));
listdep1.push(new department1('Cardiac Outreach Program','deptsandservices/cardiology/cardiacoutreach.html'));
listdep1.push(new department1('Cardiology','deptsandservices/cardiology.html'));
listdep1.push(new department1('Cardiothoracic Surgery','deptsandservices/cardiothoracicsurgery.html'));
listdep1.push(new department1('Clinical Laboratories','deptsandservices/clinlab.html'));
listdep1.push(new department1('Congestive Heart Failure Program','deptsandservices/cardiology/heartfailure.html'));
listdep1.push(new department1('CPR','deptsandservices/cpr.html'));
listdep1.push(new department1('Diabetes Care Center','deptsandservices/diabetescenter.html'));
listdep1.push(new department1('Emergency Medicine','deptsandservices/emergencymed.html'));
listdep1.push(new department1('Endoscopy','deptsandservices/endoscopy.html'));
listdep1.push(new department1('Gastroenterology','deptsandservices/gastroenterology.html'));
listdep1.push(new department1('General Surgery','deptsandservices/generalsurgery.html'));
listdep1.push(new department1('Hematology/Oncology','deptsandservices/hemonc.html'));

listdep1.push(new department1('Infectious Disease','deptsandservices/infectiousdisease.html'));
listdep1.push(new department1('Interventional Cardiology','deptsandservices/cardiology/interventionalcardiology.html'));

listdep1.push(new department1('Nephrology','deptsandservices/nephrology.html'));
listdep1.push(new department1('Neurology','deptsandservices/neurology.html'));
listdep1.push(new department1('Nutrition Services','deptsandservices/nutrition.html'));
listdep1.push(new department1('Ophthalmology','deptsandservices/opthamology.html'));
listdep1.push(new department1('Orthopedic Surgery','deptsandservices/orthosurgery.html'));
listdep1.push(new department1('Otolaryngology','deptsandservices/otolaryngology.html'));
/*listdep1.push(new department1('Pain Management Center','deptsandservices/pmc.html'));*/
listdep1.push(new department1('Pediatric Cardiology','deptsandservices/cardiology/pediatriccardiology.html'));
listdep1.push(new department1('Pharmacy','deptsandservices/pharmacy.html'));
listdep1.push(new department1('Physical Therapy','deptsandservices/physicaltherapy.html'));
listdep1.push(new department1('Podiatry','deptsandservices/podiatry.html'));
listdep1.push(new department1('Psychiatry','deptsandservices/phychiatry.html'));
listdep1.push(new department1('Pulmonary Medicine','deptsandservices/pulmonarymed.html'));
listdep1.push(new department1('Pulmonary Rehabilitation','deptsandservices/pulmonaryrehab.html'));
listdep1.push(new department1('Radiology','deptsandservices/radiology.html'));

listdep1.push(new department1('Rheumatology','deptsandservices/rheumatology.html'));
listdep1.push(new department1('The Women\'s Center','deptsandservices/womenscenter.html'));
listdep1.push(new department1('Stress Management','deptsandservices/stressmgmt.html'));
listdep1.push(new department1('Surgery','deptsandservices/surgery.html'));
listdep1.push(new department1('Urology','deptsandservices/urology.html'));
listdep1.push(new department1('Vascular Services','deptsandservices/vascularservices.html'));


function force_adddropdown1(){
			//alert("will add department dropdown");

			var dd = document.getElementById("departmentlist");

			if (!dd)
			{
				return;
			}

			var onchangeevent = false;
			var prefixurl = "";
			if (window.location.href.indexOf("index.html") != -1 ||
                            (window.location.pathname == "\/" ))
			{		prefixurl = "patients/" ;
					onchangeevent = true;
			}
			if (window.location.href.indexOf("hcp/clinicaldepts.html") != -1  )
			{		prefixurl = "../patients/" ;
					onchangeevent = true;
			}



	

			//dd.style.width="100px";
			//dd.style.float = "left";
			//var buffer = "<table border=\"1\">";

			for( var i=0; i < listdep1.length; i++){

				common_appendChildToDropDown( dd,   prefixurl + listdep1[i].link , listdep1[i].name, "" );
				//buffer += "<tr><td>"+  listdep1[i].name +"</td><td>"+ listdep1[i].link +"</td></tr>";
			}

			//common_appendChildToDropDown( dd,   "test" , "test", "" );
			//common_appendChildToDropDown( dd,   "test" , "test", "" );

			//buffer += "</table>";

			//document.write(buffer);


	
			if (onchangeevent )
			{
							dd.onchange = function(){
			
								//alert( this.value );
								if (this.value != "")
								{
											window.location = this.value;
								}

							}
			}

			

			var btn = document.getElementById("submitdpt");
			if (btn)
			{
				//alert(btn);
				btn.onsubmit= function(){
					//alert("here");
					var dd = document.getElementById("departmentlist");
					if (dd.value != "")
					{
						window.location = dd.value;
					}
					return false;
				}
			}else{
				//alert("Not found");
			}


		

}

function adddropdown1(){
		if ( window.location.href.indexOf("deptsandservices.html") != -1 || window.location.href.indexOf("index.html") != -1 || (window.location.pathname == "\/" ) )
		{

			force_adddropdown1();
		}
}

function common_appendChildToDropDown ( dropdownobj, valueelement, nameelement, valueselected ){
		
			if ( dropdownobj ){
				
					var newelement = document.createElement("option" );				
					newelement.setAttribute("value", valueelement );
					newelement.appendChild( document.createTextNode( nameelement ) );
					
					if ( valueelement == valueselected ) {
							newelement.setAttribute("selected", true);
					}
					
					dropdownobj.appendChild( newelement );			
			}
			
	}

 var emailPageWindow = null;



		/*  function added for integrating "e-mail a friend"  */
  function openEmailWindow( url ) {

	  					url = "";
	  


						//var currpage = window.location.href.replace("http://", "" ) ;
						var currpage = window.location.href;
						
						currpage = currpage.replace(/\//g, "||" );
						
						//alert( currpage ); 
					
						if ( currpage.indexOf("/") != -1 ) {
							alert( "bad parameters" );
							return;
						} 
						
						 url = "http://webapp.chsli.org/utils/mailpage/" +  currpage   ;
					
						//alert( "url will be : " + url ) ;
						
						var nWidth = 470;
						var nHeight = 650;
						var x = (screen.width - nWidth) / 3;
						var y = (screen.height - nHeight) / 3;		

						var optionString = "scrollbars=yes,location=no,resizable=yes,status=no,";
						optionString += "height=" + nHeight + ",width=" + nWidth;
						optionString += ",screenX="+ x +",screenY="+ y +",top="+ y +",left="+ x;

						if (! emailPageWindow || emailPageWindow.closed ) {
							emailPageWindow = window.open(url,"emailPageWindow",optionString);
						} else {
							// window already exists, so bring it forward
							emailPageWindow.location.href=url;
							emailPageWindow.focus();
						}

        }


/* Simple Ajax interface will go here */




/************************* simple ajax interface definition ***********************************************/

		
		var sajax_debug_mode = false;
		var sajax_request_type = "GET"

		function sajax_debug(text) {
			if (sajax_debug_mode)
				alert("RSD: " + text)
		}
 		function sajax_init_object() {
 			sajax_debug("sajax_init_object() called..")
 			
 			var A;
			try {
				A=new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					A=new ActiveXObject("Microsoft.XMLHTTP");
				} catch (oc) {
					A=null;
				}
			}
			if(!A && typeof XMLHttpRequest != "undefined")
				A = new XMLHttpRequest();
			if (!A)
				sajax_debug("Could not create connection object.");
			return A;
		}
		
		function sajax_do_call(func_name, args, auri) {
			var i, x, n;
			var uri;
			var post_data;
			
			//alert( "calldin remote functio "  + func_name + " on server: "  +auri );
			
			uri = auri;
			
			
			if (sajax_request_type == "GET") {
				if (uri.indexOf("?") == -1) 
					uri = uri + "?rs=" + escape(func_name);
				else
					uri = uri + "&rs=" + escape(func_name);
									
					
				for (i = 0; i < args.length-1; i++) 
					uri = uri + "&rsargs[]=" + escape(args[i]);
					
				uri = uri + "&rsrnd=" + new Date().getTime();
				post_data = null;
			} else {
				post_data = "rs=" + escape(func_name);
				for (i = 0; i < args.length-1; i++) 
					post_data = post_data + "&rsargs[]=" + escape(args[i]);
			}
			
			//alert("uri was be " + uri + "request type: " + sajax_request_type )				
			
			x = sajax_init_object();
			//alert("will call open with rquest type: " +  sajax_request_type + ", uri: " + uri );
			
			x.open(sajax_request_type, uri, true);
			if (sajax_request_type == "POST") {
				x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1");
				x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			}
			
			x.onreadystatechange = function() {
				if (x.readyState != 4) 
					return;
				sajax_debug("received " + x.responseText);
				
				//div = document.getElementById("debug");
				//div.innerHTML += "got this " +  x.responseText + "<br>";
				
				var status;
				var data;
				//status = x.responseText.charAt(0);
				//data = x.responseText.substring(2);
				//if (status == "-") 
				//	alert("Error: " + data);
				//else  
				args[args.length-1]( x.responseText );
			}
			x.send(post_data);
			sajax_debug(func_name + " uri = " + uri + "/post = " + post_data);
			sajax_debug(func_name + " waiting..");
			delete x;
		}
		
		

		function sajax_do_call_rest(callbackfunc, auri) {
			var i, x, n;
			var uri;
			var post_data;
			
			//alert( "calldin remote functio "  + func_name + " on server: "  +auri );
			
			uri = auri;
			
			
			if (sajax_request_type == "GET") {
				uri = uri + "&rsrnd=" + new Date().getTime();
				post_data = null;
			} else {
			}
			
			//alert("uri was be " + uri + "request type: " + sajax_request_type )				
			
			x = sajax_init_object();
			//alert("will call open with rquest type: " +  sajax_request_type + ", uri: " + uri );
			
			x.open(sajax_request_type, uri, true);
			if (sajax_request_type == "POST") {
				x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1");
				x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			}
			
			x.onreadystatechange = function() {
				if (x.readyState != 4) 
					return;
				sajax_debug("received " + x.responseText);
				
				//div = document.getElementById("debug");
				//div.innerHTML += "got this " +  x.responseText + "<br>";
				
				var status;
				var data;
				//status = x.responseText.charAt(0);
				//data = x.responseText.substring(2);
				//if (status == "-") 
				//	alert("Error: " + data);
				//else  
				callbackfunc( x.responseXML );
			}
			x.send(post_data);
			delete x;
		}

		
		function common_getDocsByDept( id ){
		
				sajax_do_call_rest( common_getDocsByDept_onReturn, "http://webapp.chsli.org/xml/doctorsbydept/" + id );

		}

		function common_getDocsByDept_onReturn( xml ){
				alert(xml );
				var docs = xml.getElementsByTagName("doctor");
				alert("found " +  docs.length + " doctors ");
		}
		

	
		function common_getDocsByDept_JSON(  department_id ){
						
			request = 'http://webapp.chsli.org/xml/jsondoctorsbydept/common_getDocsByDept_JSON_callback&' + department_id ;
			//alert( request);
			aObj = new JSONscriptRequest(request);
			aObj.buildScriptTag();
			aObj.addScriptTag();
		}


		function common_getDocsByDept_JSON_callback (jsonData) {

				  //alert( "callback function, json object: " + jsonData );

				  //alert( jsonData.doctors);
				  //alert( "fname: " + jsonData.doctors[0].first_name + " ,lname: " + jsonData.doctors[0].last_name + " ,id: " + jsonData.doctors[0].id );
				
				  aObj.removeScriptTag();

				  common_showDoctors1('doctorlist1_ajax' , jsonData );
				 
		}




		function common_getDocsBySpec_JSON( id ){
						
			request = 'http://webapp.chsli.org/xml/jsondoctorsbyspec/common_getDocsBySpec_JSON_callback&' + id ;
			//alert( request);
			aObj = new JSONscriptRequest(request);
			aObj.buildScriptTag();
			aObj.addScriptTag();
		}


		function common_getDocsBySpec_JSON_callback (jsonData) {

				  //alert( "callback function, json object: " + jsonData );

				  //alert( jsonData.doctors);
				  //alert( "fname: " + jsonData.doctors[0].first_name + " ,lname: " + jsonData.doctors[0].last_name + " ,id: " + jsonData.doctors[0].id );
				
				  aObj.removeScriptTag();

				  common_showDoctors1('doctorlist1_ajax' , jsonData );
				 
		}

		function common_showDoctors1( divname, jsonData ){
			var div = document.getElementById( divname );

			div.innerHTML = '<p>Select a doctor\'s name from the list below to learn more about them:</p>'

			if (div){

				for( var i=0; i < jsonData.doctors.length; i++){
					div.innerHTML += '<a href="http://webapp.chsli.org/doctor/doctor/view/'+ jsonData.doctors[i].id  +'">' + jsonData.doctors[i].first_name + "  " + jsonData.doctors[i].last_name    + '</a><br>';
				}
			}
		}


		/*  Json and dynamic script tags : to overcome the cross-domain problem */
		/* ************************************************************************* */


		function JSONscriptRequest(fullUrl) {
		    // REST request path
		    this.fullUrl = fullUrl; 
		    // Keep IE from caching requests
		    this.noCacheIE = '&noCacheIE=' + (new Date()).getTime();
		    // Get the DOM location to put the script tag
		    this.headLoc = document.getElementsByTagName("head").item(0);
		    // Generate a unique script tag id
		    this.scriptId = 'JscriptId' + JSONscriptRequest.scriptCounter++;
		}

		// Static script ID counter
		JSONscriptRequest.scriptCounter = 1;

		// buildScriptTag method
		JSONscriptRequest.prototype.buildScriptTag = function () {

			// Create the script tag
			this.scriptObj = document.createElement("script");
			
			// Add script object attributes
			this.scriptObj.setAttribute("type", "text/javascript");
			this.scriptObj.setAttribute("charset", "utf-8");
			this.scriptObj.setAttribute("src", this.fullUrl + this.noCacheIE);
			this.scriptObj.setAttribute("id", this.scriptId);
		}
 
		// removeScriptTag method
		// 
		JSONscriptRequest.prototype.removeScriptTag = function () {
			// Destroy the script tag
			this.headLoc.removeChild(this.scriptObj);  
		}

		// addScriptTag method
		//
		JSONscriptRequest.prototype.addScriptTag = function () {
			// Create the script tag
			this.headLoc.appendChild(this.scriptObj);
		}


		function common_show_dptsearchbutton( id ) {

			var more = "";
			if ( arguments.length == 2 )
			{
				more = arguments[1];
			}
		
			var title = document.getElementById("titledpt1");
			if (title)
			{
				//alert( title.innerHTML );

				title.innerHTML = '<div style="float:right;'+  more +'"><a href="http://webapp.chsli.org/doctor/doctor/byspec/'+ id +'" ><img src="http://webapp.chsli.org/images/findadoc.gif" width="132" height="33"  border="0"></a></div>' + title.innerHTML ;
			}
		}


function popPageInit()
{
	document.getElementById( "pppopup" ).style.display="inline";
	document.getElementById( "pppopup" ).style.top="50%";
	document.getElementById( "pppopup" ).style.left="50%";
	document.getElementById( "pppopup" ).style.marginTop="-145px";
	document.getElementById( "pppopup" ).style.marginLeft="-300px";
	document.getElementById( "pppopup" ).style.position="absolute";
	document.getElementById( "pppopup" ).style.width="600px";
	document.getElementById( "pppopup" ).style.border="1px solid #666666";
	document.getElementById( "pppopup" ).style.backgroundColor="#ffffff";
	document.getElementById( "pppopup" ).style.padding="5px";
	document.getElementById( "closepp" ).style.textAlign="right";
	
	document.getElementById( "mainpoppp" ).style.width="600px";
	document.getElementById( "mainpoppp" ).style.border="0px";
	document.getElementById( "mainpoppp" ).style.padding="10px";
	document.getElementById( "mainpoppp" ).style.backgroundColor="#D0DD97";

	document.getElementById( "innerpopPP" ).style.width="361px";
	document.getElementById( "innerpopPP" ).style.border="0px";
	document.getElementById( "innerpopPP" ).style.padding="0px";

	getPopPage( 0 );
}

function getPopPage( pnum ){
var content = new Array();
for( j=0; j<12; j++ )
{
	content[j] = new Array(5);
}

content[0][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_1.jpg" width="361" height="239" />';
content[0][1] = '<div align="left"><strong>The Nancy and Frederick DeMatteis Pavillion</strong> adds 40 percent more clinical space and will add 77 more beds to St. Francis Hospital.</div>';
content[0][2] = "";
content[0][3] = '<a href="javascript:getPopPage(1);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[0][4] = "Image 1 of 12";

content[1][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_2.jpg" />';
content[1][1] = "";
content[1][2] = '<a href="javascript:getPopPage(0);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[1][3] = '<a href="javascript:getPopPage(2);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[1][4] = "Image 2 of 12";

content[2][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_3.jpg" />';
content[2][1] = "";
content[2][2] = '<a href="javascript:getPopPage(1);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[2][3] = '<a href="javascript:getPopPage(3);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[2][4] = "Image 3 of 12";

content[3][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_4.jpg" />';
content[3][1] = "";
content[3][2] = '<a href="javascript:getPopPage(2);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[3][3] = '<a href="javascript:getPopPage(4);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[3][4] = "Image 4 of 12";

content[4][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_5.jpg" />';
content[4][1] = "";
content[4][2] = '<a href="javascript:getPopPage(3);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[4][3] = '<a href="javascript:getPopPage(5);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[4][4] = "Image 5 of 12";

content[5][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_6.jpg" />';
content[5][1] = "";
content[5][2] = '<a href="javascript:getPopPage(4);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[5][3] = '<a href="javascript:getPopPage(6);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[5][4] = "Image 6 of 12";

content[6][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_7.jpg" />';
content[6][1] = "";
content[6][2] = '<a href="javascript:getPopPage(5);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[6][3] = '<a href="javascript:getPopPage(7);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[6][4] = "Image 7 of 12";

content[7][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_8.jpg" />';
content[7][1] = "";
content[7][2] = '<a href="javascript:getPopPage(6);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[7][3] = '<a href="javascript:getPopPage(8);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[7][4] = "Image 8 of 12";

content[8][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_9.jpg" />';
content[8][1] = "";
content[8][2] = '<a href="javascript:getPopPage(7);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[8][3] = '<a href="javascript:getPopPage(9);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[8][4] = "Image 9 of 12";

content[9][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_10.jpg" />';
content[9][1] = "";
content[9][2] = '<a href="javascript:getPopPage(8);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[9][3] = '<a href="javascript:getPopPage(10);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[9][4] = "Image 10 of 12";

content[10][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_11.jpg" />';
content[10][1] = "";
content[10][2] = '<a href="javascript:getPopPage(9);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[10][3] = '<a href="javascript:getPopPage(11);"><img src="/utility/news/news/DeMatteisPavilion/next-arrow.png" border="0" /></a>';
content[10][4] = "Image 11 of 12";

content[11][0] = '<img src="/utility/news/news/DeMatteisPavilion/pavillion_slideshow_12.jpg" />';
content[11][1] = "";
content[11][2] = '<a href="javascript:getPopPage(10);"><img src="/utility/news/news/DeMatteisPavilion/previous-arrow.png" border="0" /></a>';
content[11][3] = '';
content[11][4] = "Image 12 of 12";



	document.getElementById( "imagepp" ).innerHTML = content[pnum][0];
	document.getElementById( "captionpp" ).innerHTML = content[pnum][1];
	document.getElementById( "prevpp" ).innerHTML = content[pnum][2];
	document.getElementById( "nextpp" ).innerHTML = content[pnum][3];
	document.getElementById( "numpp" ).innerHTML = content[pnum][4];
}

function showPopPage(){
document.getElementById( "pppopup" ).style.display="inline";
}

function hidePopPage(){
document.getElementById( "pppopup" ).style.display="none";
}



/* to forward a page to another page */

  function forwardToPage(url, target) {

  window.open(url, target);

}

  function myiframe (url, mywidth, myheight) {
    document.write("<br /><style type='text/css'>#careerframe {overflow-x: hidden;overflow-y: scroll;}</style><iframe id='careerframe' src="+url+" width="+mywidth+" height="+myheight+" frameborder='0' scrolling='yes' marginheight='0' marginwidth='0' topmargin='0' leftmargin='0' frameborder='0' />");				 
//    initialize();
}

  function myiframe2 (url, mywidth, myheight) {
    document.write("<br /><style type='text/css'>#careerframe {overflow-x: hidden;overflow-y: hidden;}</style><iframe id='careerframe' src="+url+" width="+mywidth+" height="+myheight+" frameborder='0' scrolling='no' marginheight='0' marginwidth='0' topmargin='0' leftmargin='0' frameborder='0' />");				 
//    initialize();

}
