<!--
function msgUpdate( e ) {
	var subpath = '../includes/header' ;
	var t = e.options[e.options.selectedIndex].text;
	var v = e.options[e.options.selectedIndex].value;
	var fullpath = subpath + v + 'js.htm' ;
	dynamic.src = fullpath ;
	e.form.hidHeaderID.value = v ;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}


//Begin dHTML Toolltip Timer
var tipTimer;
//End dHTML Toolltip Timer

function locateObject(n, d) { //v3.0
  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=locateObject(n,d.layers[i].document); return x;
}

function hideTooltip(object)
{
if (document.all)
{
	locateObject(object).style.visibility="hidden"
	locateObject(object).style.left = 1;
	locateObject(object).style.top = 1;
return false
}
else if (document.layers)
{
	locateObject(object).visibility="hide"
	locateObject(object).left = 1;
	locateObject(object).top = 1;
	return false
}
else
	return true
}

function showTooltip(object,e, tipContent, backcolor, bordercolor, textcolor, displaytime)
{
	window.clearTimeout(tipTimer)
	
	if (document.all)
		{
			locateObject(object).style.top=document.body.scrollTop+event.clientY-30
			
			locateObject(object).innerHTML='<table style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; border: '+bordercolor+'; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: '+backcolor+'" width="10" border="0" cellspacing="1" cellpadding="1"><tr><td nowrap><font style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table> '

			if ((e.x + locateObject(object).clientWidth) > (document.body.clientWidth + document.body.scrollLeft))
				{	
					locateObject(object).style.left = (document.body.clientWidth + document.body.scrollLeft) - locateObject(object).clientWidth-10;
				}
			else
			{
			locateObject(object).style.left=document.body.scrollLeft+event.clientX
			}
		locateObject(object).style.visibility="visible"
		tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
		return true;
		}
	else if (document.layers)
		{
		locateObject(object).document.write('<table width="10" border="1" cellspacing="1" cellpadding="1"><tr bgcolor="'+bordercolor+'"><td><table width="10" border="0" cellspacing="0" cellpadding="2"><tr bgcolor="'+backcolor+'"><td nowrap><font style="font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table></td></tr></table>')
		locateObject(object).document.close()
		locateObject(object).top=e.y+50

		if ((e.x + locateObject(object).clip.width) > (window.pageXOffset + window.innerWidth))
			{
				locateObject(object).left = window.innerWidth - locateObject(object).clip.width-50;
			}
		else
			{
			locateObject(object).left=e.x;
			}
		locateObject(object).visibility="show"
		tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
		return true;
	}
	else
	{
		return true;
	}
}











function submitForm(s)  {
s.value = "  Now Submitting...  ";
return true;
}


// Darren's new WP scripts  
function fnInit(){

                   
    // Prepare the editable region    
   	layoutbox.unselectable = "false";
    layoutbox.contentEditable="true";
    document.designMode = "On";
    document.execCommand("2D-Position", true, true);
    document.execCommand("MultipleSelection", true, true);
    document.execCommand("LiveResize", true, true);
}


function fnToggleOptions(sControlSet){

    if (gsCurrentControlSet != sControlSet){
      gsCurrentControlSet.style.display = "none";
      sControlSet.style.display = "block"; 
      gsCurrentControlSet = sControlSet;
    }
}

// Executes commands depending on which button has been pushed

function fnSwitch(){
	if(document.all("layoutbox").contentEditable == "true")
	{
      document.all("layoutbox").contentEditable = "false";
	  alert('The content area is not currently editable') 
   }
   else{      
	  document.all("layoutbox").contentEditable = "true";
	  alert('The page is now activated for editing')     
	}	
	
	return;
}

function fnToggleInsertImage(sImage){
    document.execCommand("InsertImage", true, sImage);
}

function fnToggleForeColor(fc){
	fCol = fc.options[fc.options.selectedIndex].value;
    document.execCommand("ForeColor", false, fCol);
}

function fnToggleBackColor(b){
	bCol = b.options[b.options.selectedIndex].value;
    document.execCommand("BackColor", false, bCol);
}

function fnToggleFontSize(e){
	iSize = e.options[e.options.selectedIndex].value;
	document.execCommand("FontSize", false, iSize);
}

function fnToggleFontName(f){
	sFont = f.options[f.options.selectedIndex].value;
    document.execCommand("FontName", false, sFont);
}

function navbar_rollon () {
    var e = window.event.srcElement
    e.type == 'button' ? e.className = 'toolbarOver' : e.parentElement.className = 'toolbarOver';
}

function navbar_rolloff () {
   var e = window.event.srcElement
    e.type == 'button' ? e.className = 'toolbar' : e.parentElement.className = 'toolbar';
}

function hideSide(){
    if(oTextControls.style.display == "none"){
        oTextControls.style.display = "" ;
        sheet.style.left = 217 ;
        sheetshadow.style.left = 217 ;
        btnHideMenu.innerHTML = "Hide Sidemenu." ;
    }else{
        oTextControls.style.display = "none"
        sheet.style.left = 167 ;
        sheetshadow.style.left = 167 ;
        btnHideMenu.innerHTML = "Display Sidemenu." ;
    }    
}

function hideObj(obj){
    var e = eval('document.all.' + obj) ;
    if(e.style.display == "none"){
        e.style.display = "" ;
    }else{
        e.style.display = "none"
    }    
}

//********************************************************************************

//script below Copyright (C) 1999 Thomas Brattli
//This script is made by and copyrighted to Thomas Brattli at www.bratta.com

//Default browsercheck, added to all scripts!

function checkBrowser(){
        this.ver=navigator.appVersion
        this.dom=document.getElementById?1:0
        this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
        this.ie4=(document.all && !this.dom)?1:0;
        this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
        this.bw=(this.ie5 || this.ie4 || this.ns5)
        return this
}

bw=new checkBrowser()

//this function hides the second span and visa versa
//Adapted for use with spans by David Hill
function showHide(id){
        obj=bw.dom?document.getElementById(id).style:bw.ie4?document.all[id].style:0;
        if(obj.display=='' || obj.display=='null') obj.display='none'
        else obj.display=''
}

//this function hides the children class spans in default menu or 
//alternatively shows children class spans that are hidden 
 
isExpanded = false;
 
function expandAll() {
 
        spanColl = document.all.tags("span");
        for (i=0; i<spanColl.length; i++) {
            if (spanColl(i).className == "children") {
                spanColl(i).style.display = (isExpanded) ? "none" : "block";
            }
        }
     
    isExpanded = !isExpanded;
}
	  
	// For putting updated HTML from divs into hidden fields  
function changeHtml(w,y)  {
		w.value = document.all('sheet').innerHTML;
		y.value = document.all('sheet2').innerHTML;
		return true;
}


function logout() {
         	input_box=confirm("Are you sure you want to Log Out?");
		if (input_box==true)		  
	  	{
	    location.replace("/artweb/demo/logout.htm");
		}
     }

function toggle(sName)
	{
		var e = document.getElementById(sName) ;
		
	  	if (e.style.display == "none")
	 		e.style.display = "";
		else
			e.style.display = "none";
	}
	
function getValue (field) {
 var r = showModalDialog('/scripts/aDialog2.html', field, 
           'Status:NO;dialogWidth:750px;dialogHeight:450px;center:1;'); 
 if (typeof r != "undefined")
   field.innerHTML = r;
}	










	

