//<!--
// JavaScript - July 2009
// J Matthew Gaskill ©2009 Cobalt Horizons Corporation

function Serialize(id){
	var FormID = document.getElementById(id);
	var FieldList = "focus=" + FormID.id;
	for(i = 0; i < FormID.elements.length; i++){
		FieldList += "&" + FormID.elements[i].name + "=" + FormID.elements[i].value;
	}
	return FieldList;
}

function CtrlPanelDisplay(id){
	Panel.style.width = '250px';

	switch(id){
		case "Request":
		RequestPanel.style.height = '200px';
		NewsletterPanel.style.height = '0px';
		MenuPanel.style.height = '0px';
		TestimonialPanel.style.height = '0px';
		break;

		case "Newsletter":
		RequestPanel.style.height = '0px';
		NewsletterPanel.style.height = '200px';
		MenuPanel.style.height = '0px';
		TestimonialPanel.style.height = '0px';
		
		//UpdateStage('Newsletter');
		break;

		case "Menu":
		RequestPanel.style.height = '0px';
		NewsletterPanel.style.height = '0px';
		MenuPanel.style.height = '200px';
		TestimonialPanel.style.height = '0px';
		
		//UpdateStage('About');
		document.forms['CtrlMenu'].elements['Menu'][2].checked = true;
		break;

		case "Testimonial":
		RequestPanel.style.height = '0px';
		NewsletterPanel.style.height = '0px';
		MenuPanel.style.height = '0px';
		TestimonialPanel.style.height = '200px';
		
		//UpdateStage('Biography');
		break;

		default:
		alert('unknown Ctrl Panel item');
		break;
	}
}

function LicenseDetail(id){
	Stage.innerHTML += '<form method="post" action="https://www2.cslb.ca.gov/OnlineServices/CheckLicense/LicenseRequest.asp" name="CheckLicense"><input type="hidden" name="EditForm" value="Yes"><input type="hidden" name="LicNum" value="' + id + '"></form>';
	CheckLicense.submit();

//document.change_record.submit();
}

function SymError(){
  return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes){
  return (new Object());
}

window.open = SymWinOpen;

/***********************************************
* IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Specify speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=1

//Specify intial delay before scroller starts scrolling (in miliseconds):
var initialdelay=500

function initializeScroller(){
	dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
	dataobj.style.top="5px"
	setTimeout("getdataheight()", initialdelay)
}

function getdataheight(){
	thelength=dataobj.offsetHeight
	if (thelength==0)
		setTimeout("getdataheight()",10)
	else
		scrollDiv()
}

function scrollDiv(){
	dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed+"px"
	if (parseInt(dataobj.style.top)<thelength*(-1))
		dataobj.style.top="5px"
	setTimeout("scrollDiv()",40)
}

if (window.addEventListener)
	window.addEventListener("load", initializeScroller, false)
else if (window.attachEvent)
	window.attachEvent("onload", initializeScroller)
else
	window.onload=initializeScroller

var SymRealOnLoad;
var SymRealOnUnload;

function SymOnUnload(){
	window.open = SymWinOpen;
	if(SymRealOnUnload != null)
		SymRealOnUnload();
}

function SymOnLoad(){
	if(SymRealOnLoad != null)
		SymRealOnLoad();
	window.open = SymRealWinOpen;
	SymRealOnUnload = window.onunload;
	window.onunload = SymOnUnload;
}

SymRealOnLoad = window.onload;
window.onload = SymOnLoad;

//-->