function stopError(){ return true; } //window.onerror=stopError;
//--- GetClientBrowser -----------------------------------------------
var browser,platform,firefoxversionerror,otherbrowsererror,iemacerror,tempsafarierror = false;
function GetClientBrowser(){
	if( !document.getElementById ){ 
		alert("Your browser does not support the DHTML standard \"getElementById()\"\n please return with an updated browser.");
		document.location.href = "http://www.mozilla.com/";
	}if( navigator.userAgent.indexOf("MSIE") != -1 ){ browser = "ie"; }
	else if( navigator.userAgent.indexOf("Firefox") != -1 ){ browser = "firefox"; }
	else if( navigator.userAgent.indexOf("Safari") != -1 ){ browser = "safari"; }
	else if( navigator.userAgent.indexOf("Opera") != -1 ){ browser = "opera"; }
	else if( navigator.userAgent.indexOf("Netscape") != -1 ){ browser = "netscape"; }
	else{ browser = "other"; }
	if( navigator.platform.indexOf("Win") != -1 ){ platform = "windows"; }
	else if( navigator.platform.indexOf("Mac") != -1 ){ platform = "mac"; }
	else{ platform = "other"; }
}	GetClientBrowser();
//
function xalert( message ){ alert("Flash Says: "+message); return true; }
//
var pageFullyLoaded = false;  
function pageInit(){ pageFullyLoaded = true; } //alert("javascript is loaded");
function javaScriptReady(){ if( pageFullyLoaded ){ initActionScript('sarahweedenfla',vvv); } return pageFullyLoaded; } //alert("flash checks if ready, returning: "+pageFullyLoaded);
function requestVariables(){ return vvv; } //alert("flash requests varibles, returning: "+typeof(vvv));

function getMovie(flashid) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[flashid]; }else{ return document[flashid]; 
	}
}
function initActionScript(flashid,args){
	//var test = new Object(); test["image"] = 'success'; //alert( test[0][0] );
	var swfRef = getMovie(flashid); //var flashFunc = swfRef.receiveVariables; //alert(swfRef);
	//var alertit = inspect(args,10,10); document.write(alertit);
	try { swfRef.sendVariables(args); } catch(e){ alert("("+swfRef+", id: "+flashid+"): swfRef.sendVariables("+args+") SAYS: "+e); }
}//

//
//--- FLASH COMMUNICATION functionality ------------------------------------------------------


 //--------------------------------------------------------
//function flashMovieCheck_in(){ alert('movie checked in'); if( typeof(photoVars) == "array" ){ sendToFlash( 'sarahweedenfla', 'receiveVars', photoVars );  } }

//--------------------------------------------------------                                    
//--- DIV functionality ------------------------------------------------------
//--------------------------------------------------------
function DOM_toggleVisibility( id, action ){ //alert(document.getElementById(id));
	document.getElementById(id).style.visibility = action;
}
function DOM_setHeight( id,hgt ){ //must send this format: "100px"
	document.getElementById(id).style.height = hgt;
}
function DOM_setPosition( id, x, y ){ //alert(x);
	document.getElementById(id).style.left = x;
	document.getElementById(id).style.top = y;
}
//--------------------------------------------------------
//--- SPECIFIC SWEEDEN FUCNCTIONS ------------------------------------------------------
//--------------------------------------------------------

function inspect(obj, maxLevels, level)
{
  var str = '', type, msg;

    // Start Input Validations
    // Don't touch, we start iterating at level zero
    if(level == null)  level = 0;

    // At least you want to show the first level
    if(maxLevels == null) maxLevels = 1;
    if(maxLevels < 1)     
        return '<font color="red">Error: Levels number must be > 0</font>';

    // We start with a non null object
    if(obj == null)
    return '<font color="red">Error: Object <b>NULL</b></font>';
    // End Input Validations

    // Each Iteration must be indented
    str += '<ul>';

    // Start iterations for all objects in obj
    for(property in obj)
    {
      try
      {
          // Show "property" and "type property"
          type =  typeof(obj[property]);
          str += '<li>(' + type + ') ' + property + 
                 ( (obj[property]==null)?(': <b>null</b>'):('')) + '</li>';

          // We keep iterating if this property is an Object, non null
          // and we are inside the required number of levels
          if((type == 'object') && (obj[property] != null) && (level+1 < maxLevels))
          str += inspect(obj[property], maxLevels, level+1);
      }
      catch(err)
      {
        // Is there some properties in obj we can't access? Print it red.
        if(typeof(err) == 'string') msg = err;
        else if(err.message)        msg = err.message;
        else if(err.description)    msg = err.description;
        else                        msg = 'Unknown';

        str += '<li><font color="red">(Error) ' + property + ': ' + msg +'</font></li>';
      }
    }

      // Close indent
      str += '</ul>';

    return str;
}







