
var loadedobjects=""
var rootdomain="http://"+window.location.hostname

function jxpage(url, boxid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, boxid)
}
page_request.open('GET', url, true)
page_request.send(null)
}

function loadpage(page_request, boxid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(boxid).innerHTML=page_request.responseText
}

function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}

var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="yes" //Collapse previously open content when opening present? (yes/no)

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.swtc{display:none;}')
document.write('</style>')
}

function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}
}

function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expc(cid){
if (typeof ccollect!="undefined"){
if (collapseprevious=="no")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}
}

function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}

document.cookie=window.location.pathname+"="+selectedItem
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
getElementbyClass("swtc")
if (enablepersist=="on" && typeof ccollect!="undefined"){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
}


if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate



function rotate(imageID) {
     var img = document.getElementById(imageID);
     if (img.src.indexOf('cnt.gif') > -1) {
         img.src = 'exp.gif'
     } else {
         img.src = 'cnt.gif'
     } 
	 
}

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];}}
}




function changeText0(){
	document.getElementById('clicked0').innerHTML = '<B>Comment:</B>';
}

function changeText1(){
	document.getElementById('clicked1').innerHTML = '<B>Comment:</B>';
}

function changeText2(){
	document.getElementById('clicked2').innerHTML = '<B>Comment:</B>';
}

function changeText3(){
	document.getElementById('clicked3').innerHTML = '<B>Comment:</B>';
}

function changeText4(){
	document.getElementById('clicked4').innerHTML = '<B>Comment:</B>';
}

function changeText5(){
	document.getElementById('clicked5').innerHTML = '<B>Comment:</B>';
}

function changeText6(){
	document.getElementById('clicked6').innerHTML = '<B>Comment:</B>';
}

function changeText7(){
	document.getElementById('clicked7').innerHTML = '<B>Comment:</B>';
}

function changeText8(){
	document.getElementById('clicked8').innerHTML = '<B>Comment:</B>';
}

function changeText9(){
	document.getElementById('clicked9').innerHTML = '<B>Comment:</B>';
}

function changeText10(){
	document.getElementById('clicked10').innerHTML = '<B>Comment:</B>';
}

function changeText11(){
	document.getElementById('clicked11').innerHTML = '<B>Comment:</B>';
}

function changeText12(){
	document.getElementById('clicked12').innerHTML = '<B>Comment:</B>';
}

function changeText13(){
	document.getElementById('clicked13').innerHTML = '<B>Comment:</B>';
}

function changeText14(){
	document.getElementById('clicked14').innerHTML = '<B>Comment:</B>';
}




