
//  Parse all of the site variables

//	Browser sniffer. Script will only be enabled in compliant browsers. Also used for sizing form fields.													

var isMac = (navigator.userAgent.indexOf("Macintosh") != -1);
var isWin = (navigator.userAgent.indexOf("Windows 95") != -1 || navigator.userAgent.indexOf("Windows NT") != -1);
var isNS =  (navigator.appName == "Netscape");
var isIE =  (navigator.userAgent.indexOf("MSIE") != -1);
var ieWin = (navigator.userAgent.indexOf("MSIE") != -1 && (navigator.userAgent.indexOf("Windows 95") != -1 || navigator.userAgent.indexOf("Windows NT") != -1));
var toolBarLoc = "";

browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))

//  TopNav rollovers
if ( browser )

{

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


	
}



										
//	Popup window openers											

function doCreateNewWindow (inUrl,inWidth,inHeight,inScroll) {
	var winl=(screen.availWidth-inWidth)/2;
	var wint=(screen.availHeight-inHeight)/2-40;

	window.open(inUrl,'cme_demo','plainWindow,width=' + inWidth +',height=' + inHeight + ',top='+wint+',left='+winl+',screenX='+wint+',screenY='+winl+',scrollbars='+inScroll);
}

// used by nyptransplant as doCreateNewWindow()
function doCreateNewWindowZeroTopLeft (inUrl,inWidth,inHeight) {
	window.open(inUrl,'cme_demo','plainWindow,width=' + inWidth +',height=' + inHeight + ',top=0,left=0');
}

// used for frames with content
function doCreateNewWindowWithContent (inUrl,inWidth,inHeight,inName,inContent) {
	var winl=(screen.availWidth-inWidth)/2;
	var wint=(screen.availHeight-inHeight)/2-40;
	
	content="<html><head><title>"+inName+"<\/title><\/head>"+inContent+"<noframes><body><\/body><\/noframes><\/html>";
	newWin = window.open ( inUrl, 'popupwindow', "scrollbars=yes,resizable,width=" + inWidth +",height=" + inHeight + ",top="+wint+",left="+winl+",screenX="+wint+",screenY="+winl );
	newWin.document.write(content);
	newWin.document.close();
}

															
//	Flash sniffer												

FlashMode = 0;

var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i];
	}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

if ( MM_FlashCanPlay ) {
	FlashMode = 1;
} else{
	FlashMode = 0;
}

// (inAltCode, inToolbarSliceHeight )
function getFlash() {
	//if (FlashMode!=1) {
	//	toolbarSliceHeight 	= inToolbarSliceHeight;
	//	currentPosition 	= 0;
	//	currentPlacementTier= 0;
	//	bottomPositions 	= 0;
	//	placedItems 		= 0;
	//	positionWidth 		= 19;
	//	tierHeight 			= 20;
	//	totalPositions		= getStartingValues ();
	//	
	//	homeHeight = 0;
	//	if (active == "home") {
	//		if (toolbarSliceHeight != null) {
	//			homeHeight = toolbarSliceHeight;
	//		}
	//		else {
		//		homeHeight = 210;
	//		}
	//	} else {
	//		homeHeight = 81;
	//	}
//
	//	positionArray		= new Array ();
	//	
	//	doSetButtons ( buttonArray, totalPositions );
	//	
	//	if (inAltCode != null) {
	//		altCode = unescape(inAltCode);
	//	} else {
	//		altCode = "<img src='" + altPanoLoc + "' width='750' height='" + homeEmbedHeight + "' border='0' usemap='#altMap'>";
	//	}
	//}
	
	// begin document write
	if (FlashMode == 1) {
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
		document.write('WIDTH="760" HEIGHT="88" id="banner" ALIGN="">');
		document.write('<PARAM NAME=movie VALUE="swf/banner.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=best> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="swf/banner.swf" loop=false menu=false quality=best bgcolor=#FFFFFF  WIDTH="760" HEIGHT="88" NAME="banner" ALIGN=""');
		document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"><\/EMBED>');
		document.write('<\/OBJECT>');
	} else {
		document.write(altCode);
		document.write("<map name='altMap'>");
		for ( i = 0; i < positionArray.length; i++ ) {
			document.write("<area shape='rect' coords='"+positionArray[i].x1+","+positionArray[i].y1+","+positionArray[i].x2+","+positionArray[i].y2+"' href='" + positionArray[i].data.URL +"'>");
		}
		document.write("<\/map>");	
	}
} // close getFlash()

//start nav bar
function getNav() {
		document.write('<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="760"><tr>   <td bgcolor="#ffffff"></td>  </tr>  <tr>   <td>');
		document.write('<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="760">  <tr>');
		document.write('<td><a href="index.html" onMouseOut="MM_nbGroup(\'out\');" onMouseOver="MM_nbGroup(\'over\',\'home\',\'images/nav/home_on.gif\',\'images/nav/home_on.gif\',1);" onClick="MM_nbGroup(\'down\',\'navbar1\',\'home\',\'images/nav/home_on.gif \',1);"><img name="home" src="images/nav/home.gif" width="109" height="28" border="0" alt=""></a></td>');
		document.write('<td><a href="who.html" onMouseOut="MM_nbGroup(\'out\');" onMouseOver="MM_nbGroup(\'over\',\'who\',\'images/nav/who_on.gif\',\'images/nav/who_on.gif\',1);" onClick="MM_nbGroup(\'down\',\'navbar1\',\'who\',\'images/nav/who_on.gif\',1);"><img name="who" src="images/nav/who.gif" width="108" height="28" border="0" alt=""></a></td>');
		document.write('<td><a href="events.html" onMouseOut="MM_nbGroup(\'out\');" onMouseOver="MM_nbGroup(\'over\',\'current\',\'images/nav/current_on.gif\',\'images/nav/current_on.gif\',1);" onClick="MM_nbGroup(\'down\',\'navbar1\',\'current\',\'images/nav/current_on.gif\',1);"><img name="current" src="images/nav/current.gif" width="105" height="28" border="0" alt=""></a></td>');
		document.write('<td><a href="round_about_way.html" onMouseOut="MM_nbGroup(\'out\');" onMouseOver="MM_nbGroup(\'over\',\'round\',\'images/nav/round_on.gif\',\'images/nav/round_on.gif\',1);" onClick="MM_nbGroup(\'down\',\'navbar1\',\'round\',\'images/nav/round_on.gif\',1);"><img name="round" src="images/nav/round.gif" width="119" height="28" border="0" alt=""></a></td>');
		document.write('<td><a href="support.html" onMouseOut="MM_nbGroup(\'out\');" onMouseOver="MM_nbGroup(\'over\',\'support\',\'images/nav/support_on.gif\',\'images/nav/support_on.gif\',1);" onClick="MM_nbGroup(\'down','navbar1\',\'support\',\'images/nav/support_on.gif\',1);"><img name="support" src="images/nav/support.gif" width="110" height="28" border="0" alt=""></a></td>');
		document.write('<td><a href="art_in_ed.html" onMouseOut="MM_nbGroup(\'out\');" onMouseOver="MM_nbGroup(\'over\',\'artined\',\'images/nav/artined_on.gif\',\'images/nav/artined_on.gif\',1);" onClick="MM_nbGroup(\'down\',\'navbar1\',\'artined\',\'images/nav/artined_on.gif\',1);"><img name="artined" src="images/nav/artined.gif" width="100" height="28" border="0" alt=""></a></td>');
		document.write('<td><a href="gallery.html" onMouseOut="MM_nbGroup(\'out\');" onMouseOver="MM_nbGroup(\'over\',\'gallery\',\'images/nav/gallery_on.gif\',\'images/nav/gallery_on.gif\',1);" onClick="MM_nbGroup(\'down\',\'navbar1\',\'gallery\',\'images/nav/gallery_on.gif\',1);"><img name="gallery" src="images/nav/gallery.gif" width="109" height="28" border="0" alt=""></a></td>');
		document.write('</tr>	</table></td>  </tr></table>');
	} //end nav bar