function columnWidthSetup() {
	var myWidth = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
	} else if( document.documentElement &&
			( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	}
	innerColumnWidth = (myWidth - 750)/6;
}
function tableColumnsCreate(numColumns) {
	for (i = 0; i <= (numColumns - 1); i++) {
		document.write('<td style="font-size:1px;line-height:1px;width:' + innerColumnWidth + 'px;">&nbsp;</td>');
		document.write('<td style="width:150px;font-size:1px;line-height:1px;">&nbsp;</td>')
	}
	document.write('<td style="font-size:1px;line-height:1px;width:' + innerColumnWidth + 'px;">&nbsp;</td>');
}
function jumpto(selSelectObject){
	if(selSelectObject.options[selSelectObject.selectedIndex].value != ''){ 
		location.href='' + selSelectObject.options[selSelectObject.selectedIndex].value
	}
}
var IFrameObj; // our IFrame object
function callToServer() {
  if (!document.createElement) {return true};
  var IFrameDoc;
  var URL = 'intro.html';
  if (!IFrameObj && document.createElement) {
    // create the IFrame and assign a reference to the
    // object to our global variable IFrameObj.
    // this will only happen the first time 
    // callToServer() is called
   try {
      var tempIFrame=document.createElement('iframe');
      tempIFrame.setAttribute('id','RSIFrame');
      tempIFrame.style.border='0px';
      tempIFrame.style.width='0px';
      tempIFrame.style.height='0px';
      IFrameObj = document.body.appendChild(tempIFrame);
      
      if (document.frames) {
        // this is for IE5 Mac, because it will only
        // allow access to the document object
        // of the IFrame if we access it through
        // the document.frames array
        IFrameObj = document.frames['RSIFrame'];
      }
    } catch(exception) {
      // This is for IE5 PC, which does not allow dynamic creation
      // and manipulation of an iframe object. Instead, we'll fake
      // it up by creating our own objects.
      iframeHTML='\<iframe id="RSIFrame" style="';
      iframeHTML+='border:0px;';
      iframeHTML+='width:0px;';
      iframeHTML+='height:0px;';
      iframeHTML+='"><\/iframe>';
      document.body.innerHTML+=iframeHTML;
      IFrameObj = new Object();
      IFrameObj.document = new Object();
      IFrameObj.document.location = new Object();
      IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
      IFrameObj.document.location.replace = function(location) {
        this.iframe.src = location;
      }
    }
  }
  
  if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
    // we have to give NS6 a fraction of a second
    // to recognize the new IFrame
    setTimeout('callToServer()',10);
    return false;
  }
  
  if (IFrameObj.contentDocument) {
    // For NS6
    IFrameDoc = IFrameObj.contentDocument; 
  } else if (IFrameObj.contentWindow) {
    // For IE5.5 and IE6
    IFrameDoc = IFrameObj.contentWindow.document;
  } else if (IFrameObj.document) {
    // For IE5
    IFrameDoc = IFrameObj.document;
  } else {
    return true;
  }
  
  IFrameDoc.location.replace(URL);
  return false;
}


function toggleMenu(id,imageName,state,menuID){
	$(id).style.backgroundImage="url('"+imageName+"')";
	if(state=='on'){
		mIn(menuID);
	} 
	if(state=='off') {
		mOut(menuID);
	}
}

function toggleSubMenu(id,imageName){
	$(id).style.backgroundImage="url('"+imageName+"')";
}


/**
 * function to 
 * @param name type purpose
 * @return type purpose
 */
function hideMenus() {
	var allNodes = document.getElementsByClassName("flyout");
for(i = 0; i < allNodes.length; i++) {
   allNodes[i].style.display="none";;
  // $(id).style.display="none";
}

} // End hideMenus function


//call when page loads
window.onload = jumptoanchor;
//
//jumps to anchor
function jumptoanchor()
{
  //test for anchor existence
  if(window.location && 
     window.location.href.match(/#(\w.+)/))
  {
    //jump to anchor
    window.location.hash=
    window.location.href.match(/#(\w.+)/)[1]; 
  }
}


