
//////////////////////////////////////////////////////////////////////////////////////////////////
function infoscroll(seed,looped)
{
  var text1  = " East West Science Center ";
  var text2  = "                   Nuclear Fission, Dark Energy, Environment              ";        
  var msg=text1+text2;
  var putout = " ";
  var c   = 1;

  if (looped > 10) 
  {  window.status="<Thanks !>";  }
  else if (seed > 100) 
  {
     seed--;
     var cmd="infoscroll(" + seed + "," + looped + ")";
     timerTwo=window.setTimeout(cmd,100);
  }
  else if (seed <= 100 && seed > 0) 
  {
    for (c=0 ; c < seed ; c++) 
    {  putout+=" ";  }
    putout+=msg.substring(0,100-seed);	
    seed--;
    var cmd="infoscroll(" + seed + "," + looped + ")";
    window.status=putout;
    timerTwo=window.setTimeout(cmd,100);
  }
  else if (seed <= 0) 
  {
    if (-seed < msg.length) 
    {
      putout+=msg.substring(-seed,msg.length);
      seed--;
      var cmd="infoscroll(" + seed + "," + looped + ")";
      window.status=putout;
      timerTwo=window.setTimeout(cmd,100); // 100
    }
    else 
    {
      window.status=" ";
      looped += 1;
      var cmd = "infoscroll(100," + looped + ")";
      timerTwo=window.setTimeout(cmd,75); // 75
    }
  }
}

infoscroll(100,1)


//////////////////////////////////////////////////////////////////////////////////////////////////
var dragobject={
z: 0, x: 0, y: 0, offsetx : null, offsety : null, targetobj : null, dragapproved : 0,
initialize:function(){
document.onmousedown=this.drag
document.onmouseup=function(){this.dragapproved=0}},
drag:function(e){
var evtobj=window.event? window.event : e
this.targetobj=window.event? event.srcElement : e.target
if (this.targetobj.className=="drag"){
this.dragapproved=1
if (isNaN(parseInt(this.targetobj.style.left))){this.targetobj.style.left=0}
if (isNaN(parseInt(this.targetobj.style.top))){this.targetobj.style.top=0}
this.offsetx=parseInt(this.targetobj.style.left)
this.offsety=parseInt(this.targetobj.style.top)
this.x=evtobj.clientX
this.y=evtobj.clientY
if (evtobj.preventDefault)
evtobj.preventDefault()
document.onmousemove=dragobject.moveit
}},
moveit:function(e){
var evtobj=window.event? window.event : e
if (this.dragapproved==1){
this.targetobj.style.left=this.offsetx+evtobj.clientX-this.x+"px"
this.targetobj.style.top=this.offsety+evtobj.clientY-this.y+"px"
return false
}}
}

dragobject.initialize()
//////////////////////////////////////////////////////////////////////////////////////////////////
function php_s(obj)
{
    var string = '';

    if (typeof(obj) == 'object') {
        if (obj instanceof Array) {
            string = 'a:';
            tmpstring = '';
            count = 0;
            for (var key in obj) {
                tmpstring += php_serialize(key);
                tmpstring += php_serialize(obj[key]);
                count++;
            }
            string += count + ':{';
            string += tmpstring;
            string += '}';
        } else if (obj instanceof Object) {
            classname = obj.toString();

            if (classname == '[object Object]') {
                classname = 'StdClass';
            }

            string = 'O:' + classname.length + ':"' + classname + '":';
            tmpstring = '';
            count = 0;
            for (var key in obj) {
                tmpstring += php_serialize(key);
                if (obj[key]) {
                    tmpstring += php_serialize(obj[key]);
                } else {
                    tmpstring += php_serialize('');
                }
                count++;
            }
            string += count + ':{' + tmpstring + '}';
        }
    } else {
        switch (typeof(obj)) {
            case 'number':
                if (obj - Math.floor(obj) != 0) {
                    string += 'd:' + obj + ';';
                } else {
                    string += 'i:' + obj + ';';
                }
                break;
            case 'string':
                string += 's:' + obj.length + ':"' + obj + '";';
                break;
            case 'boolean':
                if (obj) {
                    string += 'b:1;';
                } else {
                    string += 'b:0;';
                }
                break;
        }
    }

    return string;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
function cookies(name,value)
{ 				

	if(value=='none') value='';
	document.cookie=name +'='+ escape(value); 

}

function setcookie( name, value, expires ) {
	
	var today = new Date();
	today.setTime( today.getTime() );
	if ( expires ) {
		expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );
	document.cookie = name+'='+escape( value ) +';'+
		( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) + 
		';path=/' +	';domain=rivebox.com' +';secure';
		document.write('<br> cookie says'+document.cookie+'<br>');
}
function getCookie( name )
{
	
		var start = document.cookie.indexOf( name + "=" );
		var len = start + name.length + 1;
		if ( ( !start ) &&
		( name != document.cookie.substring( 0, name.length ) ) )
		{
		return null;
		}
		if ( start == -1 ) return null;
		var end = document.cookie.indexOf( ";", len );
		if ( end == -1 ) end = document.cookie.length;
		return unescape( document.cookie.substring( len, end ) );
}
		