   var blurvalue=0; //value that describes the color variable
   var color=0; //color of the description text
   var currentpage="home.html"; //used for base6-1 and base6-2
   var page=0 //current images selected
   var t=0; //for the timer
   var text="Art = Life"; //for the text
   var width=0; //width of the user's window
   var x=53.0;
   var xs=2.0;
   var xs2=0.05;
   var y=20.0;
   var ys=2.0;
   var ys2=0.1;
   width=screen.availWidth;
  
function blur(){
    description.innerHTML=text;
    if (blurvalue<=0){
     blurvalue=0;
    }
    color='#000000';
    if (blurvalue>0){
     color='#002900';
    }
    if (blurvalue>1){
     color='#004300';
    }
    if (blurvalue>2){
     color='#007400';
    }
    if (blurvalue>3){
     color='#009900';
    }
    if (blurvalue>4){
     color='#00c000';
    }
    if (blurvalue>5){
     color='#00E800';
    }
    blurvalue=blurvalue-1;
    description.style.color=color;
    if (blurvalue>-1){
     t=setTimeout("blur()",55);
    }
   }

function blurout(){
    if (blurvalue<=-1){
     blurvalue=-1;
    }
    color='#00E800';
    if (blurvalue>0){
     color='#00c000';
    }
    if (blurvalue>1){
     color='#009900';
    }
    if (blurvalue>2){
     color='#007400';
    }
    if (blurvalue>3){
     color='#004300';
    }
    if (blurvalue>4){
     color='#002900';
    }
    if (blurvalue>5){
     color='#000000';
    }
    blurvalue=blurvalue-1;
    description.style.color=color;
    if (blurvalue>-1){
     t=setTimeout("blurout()",20);
    }
    else{
     blurvalue=6;
     blur();
    }
   }
   
function changeartimage(whatimage){
    if (whatimage!=null && whatimage!=""){
     document.getElementById("art&Design_image").src=whatimage;
    }
    else{
     document.getElementById("art&Design_image").src="backboxfiles/art/blank.jpg";
    }
   }
   
function changeimage(im){
    if (im==1){
     document.getElementById('mapimage').src="mapimages/webmenu_over.jpg";
    }
    if (im==0){
     document.getElementById('mapimage').src="mapimages/webmenu_out.jpg";
    }
    if (im==2){
     document.getElementById('mapimage').src="mapimages/webmenu_out.jpg";
    }
   }
   
function checkCookie(){ //script courtesy of http://www.w3schools.com/JS/js_cookies.asp
    currentpage=getCookie('fowardfromhome');
    if (currentpage!=null && currentpage!=""){
	 setCokie('fowardfromhome','',2);
     if (currentpage=="base6-1.html"){
      foward(currentpage,1);
     }else{
      foward(currentpage,0);
     }
    }
    else{
	 foward('blog.html',0);
    // currentpage="home.html";
    }
   }
   
function drawpage(number){
   switch(page){
    case 0:
	 document.getElementById('thepage').innerHTML="<image id='image1' onclick=changeartimage('backboxfiles/pl_images/lighting_concept20.jpg');document.getElementById('art&Design_image').style.width='273px' src='backboxfiles/pl_thumbs/lighting_concept_thumb.jpg'> <image id='image2' onclick=changeartimage('backboxfiles/pl_images/pretzels_70.jpg');document.getElementById('art&Design_image').style.width='370px' src='backboxfiles/pl_thumbs/pretzels_thumb.jpg'> <image id='image3' onclick=changeartimage('backboxfiles/pl_images/ribbons_logo50.bmp');document.getElementById('art&Design_image').style.width='556px' src='backboxfiles/pl_thumbs/ribbons_thumb.jpg'> <image id='image4' onclick=changeartimage('backboxfiles/pl_images/stagLOGO.jpg');document.getElementById('art&Design_image').style.width='177px' src='backboxfiles/pl_thumbs/stagl_thumb.jpg'>";
	 number=4;
	 break;
	case 1:
	 document.getElementById('thepage').innerHTML="<image id='image1' onclick=changeartimage('backboxfiles/pl_images/polianstudios.jpg');document.getElementById('art&Design_image').style.width='298px' src='backboxfiles/pl_thumbs/polians_thumb.jpg'> <image id='image2' onclick=changeartimage('backboxfiles/pl_images/lighting2.jpg');document.getElementById('art&Design_image').style.width='270px' src='backboxfiles/pl_thumbs/lighting_thumb.jpg'> <image id='image3' onclick=changeartimage('backboxfiles/pl_images/globe-concept.jpg');document.getElementById('art&Design_image').style.width='273px' src='backboxfiles/pl_thumbs/globeconcept_thumb.jpg'>";
	 number=3;
	 break;
	default:
	 document.getElementById('thepage').innerHTML="<image id='image1' onclick=changeartimage('backboxfiles/pl_images/lighting_concept20.jpg');document.getElementById('art&Design_image').style.width='273px' src='backboxfiles/pl_thumbs/lighting_concept_thumb.jpg'> <image id='image2' onclick=changeartimage('backboxfiles/pl_images/pretzels_70.jpg');document.getElementById('art&Design_image').style.width='370px' src='backboxfiles/pl_thumbs/pretzels_thumb.jpg'> <image id='image3' onclick=changeartimage('backboxfiles/pl_images/ribbons_logo50.bmp');document.getElementById('art&Design_image').style.width='556px' src='backboxfiles/pl_thumbs/ribbons_thumb.jpg'> <image id='image4' onclick=changeartimage('backboxfiles/pl_images/stagLOGO.jpg');document.getElementById('art&Design_image').style.width='177px' src='backboxfiles/pl_thumbs/stagl_thumb.jpg'>";
	 number=4;
   }
   document.getElementById('thepage').innerHTML="<image height='70px' onclick='less()' src='backboxfiles/pl_images/whitespace.bmp' width='100px'><image src='backboxfiles/pl_images/l_arrow.bmp' onclick='less()'> "+document.getElementById('thepage').innerHTML+" <image src='backboxfiles/pl_images/r_arrow.bmp' onclick='more()'><image height='70px' onclick='more()' src='backboxfiles/pl_images/whitespace.bmp' width='100px'>"
   for (var i=1;i<=number;i++){
    document.getElementById('image'+i).style.cursor="pointer";
   }
  }
   
   function evalsound(soundobj,playorstop) { //script courtesy of http://www.phon.ucl.ac.uk/home/mark/audio/play.htm
    if (playorstop==1){
	 evalsound(soundobj,0)
     var thissound= eval("document."+soundobj);
     thissound.Play();
	}else{
	 var thissound= eval("document."+soundobj);
     thissound.Stop();
	}
   }

function exit(){
    //setCookie('backtopolian',currentpage,7);
   }
   
function foward(linkto,external){
    if (external==0){
     base_frame.location=linkto;
     currentpage=linkto;
    }
    else{
     window.location=linkto;
     setCookie('backtopolian',currentpage,7)
    }
    for (i=0;i<=10;i++){
     if (linkto.indexOf("/")>=0){
      linkto=linkto.slice(linkto.indexOf("/")+1)
     }
    }
    if (linkto.indexOf(".html")>=0){
     linkto=linkto.replace(/.html/,"")
    }
    else{
     linkto=linkto.replace(/.htm/,"")
    }
    var store=linkto;
    store=store.slice(1);
    store=linkto.replace(store,"");
    store=store.toUpperCase();
    linkto=store+linkto.slice(1);
    if (linkto=="Blog"){
     linkto="Welcome to Polian Studios!";
    }
    pagetitle(linkto);
    document.title=linkto;
   }
   
function getCookie(c_name){ //script courtesy of http://www.w3schools.com/JS/js_cookies.asp
    if (document.cookie.length>0){
     c_start=document.cookie.indexOf(c_name + "=");
     if (c_start!=-1){
      c_start=c_start + c_name.length+1; 
      c_end=document.cookie.indexOf(";",c_start);
      if (c_end==-1) c_end=document.cookie.length;
      return unescape(document.cookie.substring(c_start,c_end));
     } 
    }
    return "";
   }
   
function less(){
   if (page==0){
    page=1;
   }else{
    page=0;
   }
   drawpage();
  }
   
function more(){
   if (page==1){
    page=0;
   }else{
    page=1;
   }
   drawpage();
  }
   
function movelink(){
   x=x+xs;
   document.getElementById('link').style.left=x;
   y=y+ys;
   document.getElementById('link').style.top=y;
   if (xs>=2.0){
    xs=xs/2;
    xs2=-0.05;
   }
   if (xs<=-2.0){
    xs=xs/2;
    xs2=0.05;
   }
   if (ys>=2.0){
    ys=ys/2;
    ys2=-0.1;
   }
   if (ys<=-2.0){
    ys=ys/2;
    ys2=0.1;
   }
   xs=xs+xs2;
   ys=ys+ys2;
   //alert(x+":"+y+":"+xs+":"+ys);
   var t=setTimeout("movelink()",30);
  }

function pagetitle(intext){
    //document.getElementById('page_title').innerHTML=intext;
   }
   
function setCokie(c_name,value,expiredays){ //script courtesy of http://www.w3schools.com/JS/js_cookies.asp
    var exdate=new Date();
    exdate.setDate(exdate.getDate()+expiredays);
    document.cookie=c_name+ "=" +escape(value)+
    ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
   }
   
function startup(){
    blurvalue=6;
    clearTimeout(t);
    blur();
    if (width<850){
     document.getElementById('mapimage').style.visible="hidden";
     document.getElementById('mapimage').style.width=0;
     document.getElementById('border_right').style.width=0;
    }
    //checkCookie();
    //foward(currentpage,0);
    pagetitle('Welcome to Polian Studios!');
    specialtext.innerHTML="";

    var str=window.location;
    for (i=0;i<=10;i++){
     if (str.indexOf("?B=")>=0){
      str=str.slice(str.indexOf("?B=")+3)
     }
    }
    alert(str);

    if (str == "art&Design.html"){
     for (var i=1;i<=4;i++){
      document.getElementById('image'+i).style.cursor="pointer";
     }
     movelink();
    }
   }
   
function updatetext(intext){
    blurvalue=6;
    clearTimeout(t);
    text=intext;
    blurout();
   }
   
function updatetextout(form,intext){
    form.style.background='#00DD00';
    blurvalue=6;
    clearTimeout(t);
    description.innerHTML=text;
    text=intext;
    blurout();
   }