if (document.images) {
  view = new Image();
  view.src = "/images/viewicon-on.gif";
  viewWMA = new Image();
  viewWMA.src = "/images/viewicon2-on.gif";
  email = new Image();
  email.src = "/images/envelope-on.gif";
  discuss = new Image();
  discuss.src = "/images/discuss-on.gif";
  order = new Image();
  order.src = "/images/purchase-on.gif";
  problems = new Image();
  problems.src = "/images/problems-on.gif";
  }

function video(x){
window.open(x, "video","width=400,height=300");

}
  

function Is(){
agent = navigator.userAgent.toLowerCase(); 
this.major = parseInt(navigator.appVersion); 
this.minor = parseFloat(navigator.appVersion); 
this.ns = ((agent.indexOf('mozilla') != -1) && ((agent.indexOf('spoofer')  == -1) && (agent.indexOf('compatible') == -1))); 
this.ns4 = (this.ns && (this.major == 4)); 
this.ns6 = (this.ns && (this.major >= 5)); 
this.saf = (agent.indexOf("safari") != -1);
this.ie = (agent.indexOf("msie") != -1); 
}

var is = new Is(); 

if (is.ns4) {
window.location.href="/errorbrowser.html" ;
}
 
if (is.ns6) {
document.write('<link href="http://californiaconnected.org/netscape-style.css" rel=stylesheet type="text/css">')
}
 if (is.ie || is.saf){
document.write('<link href="http://californiaconnected.org/style.css" rel=stylesheet type="text/css">');
}



function reLocate() {
if (window.opener && !window.opener.closed) {
opener.document.location.href="http://californiaconnected.org";
} else {
window.open("http://californiaconnected.org",null,"status=yes,toolbar=yes,menubar=yes,location=yes"); 
	}
}



function checkReg(x){

var content = document.whatever[x].value;

if (content.indexOf("your")!=-1){
document.whatever[x].value = ''
   }
}

function emailer(blurb,url){


alert("Sorry, this page is outdated. \nWe will now pass you to the new site.");

window.location.href="http://californiaconnected.org/wp/index.php";
exit;

var emailer;

var fullurl = "http://californiaconnected.org"+url ;

emailer = window.open("http://californiaconnected.org/cgi-bin/friendssetup2.pl?url="+fullurl+"&blurb="+blurb,"emailer","width=380,height=420,scrollbars=1,resizable=1,history=0,toolbar=0,directory=0,status=1");

}

function actonthis(x){

var event = escape(x);

document.location.href="http://californiaconnected.org/cgi-bin/actioncontact.pl?to=webmaster&name=Action%20Alerts%20Reader&from=webmaster@californiaconnected.org&body=I%20will%20act%20upon%20an%20events%20listing%20called%20\""+event+"\"."

}

// this is for the 2003 and 2002 segment movie pop-up's

function oldmoviePlayer(x){
wmoviePlayer(x);
}

function wohonemoviePlayer(x){

video = window.open(x,"video","width=260,height=198,scrollbars=1,resizable=1,history=0,toolbar=0,directory=0,status=1");
}
function wmoviePlayer(x){

video = window.open(x,"video","width=230,height=182,scrollbars=1,resizable=1,history=0,toolbar=0,directory=0,status=1");
}

function moviePlayer(x){

video = window.open(x,"video","width=400,height=300,scrollbars=1,resizable=1,history=0,toolbar=0,directory=0,status=1");
}



function roll(x){

replacement="/images/"+x+"-on.gif";

document[x].src=replacement;

}

function off(x){

replacement="/images/"+x+".gif";

document[x].src=replacement;

}




function episode(x){

replacement="/segments/2003/images/big-"+x+".jpg";

document.episodestill.src=replacement;

}

function hideShow(id,peekaboo){
        document.getElementById(id).style.display = peekaboo;
}

function setBackgroundColor(id,bgcolor){
    document.getElementById(id).style.backgroundColor =  bgcolor  ;
}

