﻿<!--	////////////////////////////////////////////////////////	// miscellaneous local functions	////////////////////////////////////////////////////////	//		//for setting up windows and redirects		window.name="main";	IE = (document.all)? 1:0;	NN = (document.layers)? 1:0;		// Show/Hide functions for non-pointer layer/objects		function show(id) {		if (NN) document.layers[id].visibility = "show";		else if (IE) document.all[id].style.visibility = "visible";	}		function hide(id) {		if (NN) document.layers[id].visibility = "hide";		else if (IE) document.all[id].style.visibility = "hidden";	}		function openBox(url) {		 viewerWin = window.open(url,"messagebox","width=550,height=550");		 viewerWin.focus();		 return url;	}		function audioBox(url) {		 viewerWin = window.open(url,"audiobox","width=200,height=50");		 viewerWin.focus();		 return url;	}		function closeBox() {		 viewerWin.close();	}		function myopen(filename,windowname,properties) {		mywindow = window.open(filename,windowname,properties);	}		// This code taken directly from RANDOMWALKS	// ... which is a very cool weblog	// Lots of other have stolen this code from RW, but few give credit	// for writing such a great piece of user-centered Javascript.	// Thank you SBomb and RANDOMWALKS - www.randomwalks.com		function targetLinks(boNew) {		 if (boNew) where = "_blank";		 else where = "_self";		 for (var i=0; i<=(document.links.length-1); i++) {			 document.links[i].target = where; 		 }	}		function OpenComments (c) {		window.open(c,'comments','width=480,height=480,scrollbars=yes,status=yes');		}		function OpenTrackback (c) {		window.open(c,'trackback','width=480,height=480,scrollbars=yes,status=yes');		}	////////////////////////////////////////////////////////	// old netscape browser layer fix functions	////////////////////////////////////////////////////////	//		// set this var to match the name of the layer you want to check.		var layertoCheck = "daMenu";	var start_width = 0;	var start_height = 0;		// a netscape bug makes layers lose their css positioning when the browser is	// resized. check if that's happened here, if it has, reload the document to	// fix the the page layout.		function fixNetscapeCSS() {			current_width = document.layers[layertoCheck].document.width;		current_height = document.layers[layertoCheck].document.height;				if (current_width != start_width || current_height != start_height) {			location.reload();		}	}		// if the browser is netscape, assign the "onresize" handler to execute the fix function.	if (document.layers) {		onresize = fixNetscapeCSS;		}	////////////////////////////////////////////////////////	// popup windowing and show/hide functions	////////////////////////////////////////////////////////	//		var win1Open = null	var win2Open = null	var win3Open = null	var win4Open = null	var win5Open = null	var win6Open = null	var win7Open = null	var win8Open = null	var win9Open = null		function openPopUp(windowURL, windowName, windowWidth, windowHeight) {		var winHandle = window.open(windowURL,windowName,"toolbar=no,scrollbars=yes,resizable=yes,width=" + windowWidth + ",height=" + windowHeight)		return winHandle	  }	  	function winClose() {    // close all open pop-up windows   		if(win1Open != null) win1Open.close() 		if(win2Open != null) win2Open.close() 		if(win3Open != null) win3Open.close() 		if(win4Open != null) win4Open.close() 		if(win5Open != null) win5Open.close() 		if(win6Open != null) win6Open.close() 		if(win7Open != null) win7Open.close() 		if(win8Open != null) win8Open.close() 		if(win9Open != null) win9Open.close()       	  }	  	// does nothing but required by JavaScript & shows in status bar	function openPopUpWindow() {}  	////////////////////////////////////////////////////////	// Toggling functions	////////////////////////////////////////////////////////	//		function toggleAll(itemname, state) {	    tmp = document.getElementsByTagName('div');	    for (i=0;i<tmp.length;i++) {	        if (tmp[i].className == itemname) tmp[i].style.display=state;	    }	}		function toggle(idname) {	    document.getElementById(idname).style.display=(document.getElementById(idname).style.display=='none')?'block':'none';	}							////////////////////////////////////////////////////////	// Laszlo functins	////////////////////////////////////////////////////////	//		/*	 * JavaScript library for embedding Laszlo applications	 *	 * Copyright Laszlo Systems, Inc. 2003	 * All Rights Reserved.	 *	 * Usage:	 * In the <html><head> of an HTML document that embeds a Laszlo application,	 * add this line:	 *   <script src="{$lps}/embed.js" language="JavaScript" type="text/javascript"/>	 * At the location within the <html><body> where the application is to be	 * embeded, add this line:	 *   <script language="JavaScript" type="text/javascript">	 *     lzEmbed({url: 'myapp.lzx?lzt=swf', bgcolor: '#000000', width: '800', height: '600'});	 *   </script>	 * where the url matches the URI that the application is served from, and	 * the other properties match the attributes of the application's canvas.	 */		/* Write a tag start.  This code assumes that the attribute values don't	 * require inner quotes; for instance, {x: '100'} works, but	 * {url: 'a>b'} or {url: 'a"b'} won't. */	 	function lzWriteElement(name, attrs, closep, escapeme) {	    var lt = escapeme ? '&lt;' : '<';	    var o = lt + name;	    for (var p in attrs)	        o += ' ' + p + '="' + attrs[p] + '"';	    if (closep)	        o += '/';	    o += '>';	    return o;	}		function containskey (arr, key) {	    return (arr[key] != null);	}		/* Update each property of a with the value of the same-named property	 * on b. For example, lzUpdate({a:1, b:2}, {b:3, c:4}) mutates the	 * first argument into {a:1, b:3}. */	 	function lzUpdate(a, b) {	    for (var p in a)	        if (containskey(b,p)) {	            a[p] = b[p];	        }	}			/* Write an <object> and <embed> tag into the document at the location	 * where this function is called.  Properties is an Object whose properties	 * override the attributes and <param> children of the <object> tag, and	 * the attributes of the <embed> tag.	 */	 	function lzEmbed(properties, escapeme) {	    var url = properties.url;	    var width = properties.width;	    var height = properties.height;	    var o = '';	    var lt = escapeme ? '&lt;' : '<';	    	    objectAttributes = {	        classid: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',	        type: 'application/x-shockwave-flash',	        width: 0, height: 0	    };		    lzUpdate(objectAttributes, properties);	    objectParams = {	        movie: url,	        scale: 'exactfit',	        salign: 'lt',	        // The properties parameter should override these.	        width: 0, height: 0, bgcolor: 0};	    lzUpdate(objectParams, properties);	    embedAttributes = {	        type: 'application/x-shockwave-flash',	        pluginspage: "http://www.macromedia.com/go/getflashplayer",	        scale: 'exactfit',	        src: url,	        quality: 'high',	        salign: 'lt',	        // The properties parameter should override these.	        width: 0, height: 0, bgcolor: 0};	    lzUpdate(embedAttributes, properties);	    	    var ns = (document.layers)? true:false;	    var ie = (document.all)? true:false;		    // add codebase object to upgrade windows ie players	    // supposedly breaks some mac ie?	    var win = navigator.appVersion.indexOf('Win') != -1;	    if (win)	        objectAttributes.codebase =  "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0";		    if (navigator.appVersion.indexOf("Macintosh")!=-1) {	        objectAttributes['data'] = url;	    }		    if  (ns) {	        o = lzWriteElement('embed', embedAttributes, true, escapeme);	    } else {	        o = lzWriteElement('object', objectAttributes, false, escapeme);	        for (var p in objectParams)	        o += lt + 'param name="' +	                 p + '" value="' +	                 objectParams[p] + '" />\n';	        o += lzWriteElement('embed', embedAttributes, true, escapeme);	        o += lt + '/object>\n';	    } 	    //alert(o);	    document.write(o);	    return o;	}//-->