function changer(book_id,offset)
{
   //<?=getphotos(); ?>
   //window.alert(stuff[0]);
   //window.alert(window.parent.changeImg.location.href);
   parent.frames[1].location.href="thumbs.php?id="+book_id+"&offset="+offset;
   if(offset==0)
    {
        window.parent.changeImg.location="bigImg.php?id="+book_id;
    }
}

function iRoll(i1,i2,c,l)
{ //window.alert( window.parent.changeImg.location.href);
   //window.alert("hi");
  d=window.parent.changeImg.document.getElementById("caption"); 
  a=window.parent.changeImg.document.getElementById("linker");
  // window.alert(d.innerHTML);
    //window.alert(a.attributes['target'].value);
    //window.alert( window.parent.changeImg.document.documentElement.tagname[d]); 

    window.parent.changeImg.document.images[i1].src="images/upload/medium"+i2;
    d.innerHTML=c;
    if(l)
    {
       a.attributes['href'].value=l;
       a.attributes['target'].value="_blank";
    }
    else
     {
         a.attributes['href'].value="#";  
         a.attributes['target'].value="_self";
      } 
    //window.parent.changeImg.document.objects[d].innerHTML="<P>"+c+"</p>";
     //parent.window.frames[changeImg].images[i1].src="images/upload"+i2;
     
}

function winlaunch(name)
{
    //window.alert(xwidth);
    if(name=="mpi")
    {
       window.open("mockup.html","mpi","width=786,height=539,toolbar=no,status=no,location=no,directories=no,menubar=no,resizable=yes,scrollbars=no");
     }
    else if(name=="photobook")
    {
      
       window.open("mainframe.html",name,"width=775,height=480,toolbar=no,status=no,location=no,directories=no,menubar=no,resizable=no,scrollbars=no");
    }
}   