function clearText(thefield){
	if (thefield.defaultValue==thefield.value) {
	 thefield.value = "";
	} else if (thefield.value=='') {
	 thefield.value = thefield.defaultValue;
	} 
} 

function toggleFAQ ( targetId ){
  if (document.getElementById){
	   target = document.getElementById( targetId );
  			if (target.style.display == "none"){
  				target.style.display = "";
  			} else {
  				target.style.display = "none";
  			}
  	}
} 

function selectCMSArchive()
{
	document.selectCMSID.content_id.value=document.selectCMS.content_id.value;
    document.selectCMSID.submit();
	
}

function selectContentType()
{
	document.selectcontenttype.content_type.value=document.selectContent.content_type.value;
    document.selectcontenttype.submit();
	
}

function gotoURL(urltogo)
{
	selectedIndex = urltogo.options.selectedIndex;
	urltg = urltogo.options[selectedIndex].value;
	window.location = urltg;
}


startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}


function toggle( targetId ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.display == "none"){
  				target.style.display = "";
  			} else {
  				target.style.display = "none";
  			}
  	}
} 

function change_inner_text ( targetId, text1, text2 ) {
	if (document.getElementById) {
		if ( innerTxt =  document.getElementById( targetId )) {
				if (innerTxt.innerHTML==text1) { 
			    innerTxt.innerHTML = text2;
			  } else {
				innerTxt.innerHTML = text1;
			  } 	
		   }
	}	
}

function change_inner_image ( targetId, img1, img2 ) {
	if (document.getElementById) {
		if ( innerTxt =  document.getElementById( targetId )) {
				if (innerTxt.src==img2) { 
				innerTxt.src = img1;
			  } else {
				innerTxt.src = img2;
			  } 	
		   }
	}	
	
}


function fixit(content) {
	var str = content.replace(new RegExp('\n', 'g')," ");
	return str;
}


var i=0;
function resize() {
  if (navigator.appName == 'Netscape') i=10;
  if (document.images[0]) window.resizeTo(document.images[0].width +500, document.images[0].height+707-i);
  self.focus();
}


function popupWindow(url) {

  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=500,height=400,screenX=150,screenY=150,top=0,left=0')

}



