// Macromedia Functions
function MM_changeProp(objId,x,theProp,theValue) { //v9.0
    var obj = null; with (document){ if (getElementById)
    obj = getElementById(objId); }
    if (obj){
    if (theValue == true || theValue == false)
        eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
    }
}

// urchin tracking for inside body
function utSend(btnName){
	var trackString = btnName + thisPage;
	urchinTracker(trackString);
}
	

// Cookies
function cookieIt(btnName){
	var trackString = btnName + thisPage;
	if ( ! get_cookie ( "btnClick" ) ){
		set_cookie("btnClick", trackString);
	}
	else{
		delete_cookie("btnClick");
		set_cookie("btnClick", trackString, '','','', '/');
	}
}

function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
{
	var cookie_string = name + "=" + escape ( value );
	if ( exp_y )
	{
		var expires = new Date ( exp_y, exp_m, exp_d );
		cookie_string += "; expires=" + expires.toGMTString();
	}
	if ( path )
		cookie_string += "; path=" + escape ( path );
	if ( domain )
		cookie_string += "; domain=" + escape ( domain );
	if ( secure )
		cookie_string += "; secure";
	document.cookie = cookie_string;
}

function delete_cookie ( cookie_name )
{
	var cookie_date = new Date ( );  // current date & time
	cookie_date.setTime ( cookie_date.getTime() - 1 );
	document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}

function get_cookie ( cookie_name )
{
	var results = document.cookie.match ( cookie_name );
	if ( results )
		return ( unescape ( results[1] ) );
	else
		return null;
}

// Expandit

function expandit(objname,image){
    var folder='';
    curobj = objname + 'info';
    imgobj = objname + 'img';
    folder = getObjectRef(curobj).style;
	if (folder.display=="none") {
        folder.display="";
        getObjectRef(imgobj).src = "http://www.regonline.com/documents/web/images/spacer.gif";
    } else {
        folder.display="none"
        getObjectRef(imgobj).src = "http://www.regonline.com/documents/web/images/spacer.gif";
    }
}
function getObjectRef(n, d) {

  //based off MM_findObj v4.01
  //n: String
  //d: Document (for netscape4 recursion)

  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=getObjectRef(n,d.layers[i].document);
	
  if(!x && d.getElementById) 
  	x=d.getElementById(n); 
	
  return x;
}