<!--

    var clientPC = navigator.userAgent.toLowerCase();
	var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));

   hexa = new Array(16);
   for(var i = 0; i < 10; i++) hexa[i] = i;
   hexa[10] = "a";
   hexa[11] = "b";
   hexa[12] = "c";
   hexa[13] = "d";
   hexa[14] = "e";
   hexa[15] = "f";

   function hex(i)
   {
    if (i < 0) return "00";
    else if (i > 255) return "ff";
         else return "" + hexa[Math.floor(i/16)] + hexa[i%16];
   }

   function setbgColor(r, g, b)
   {
    var hr = hex(r);
    var hg = hex(g);
    var hb = hex(b);
    document.bgColor = "#"+hr+hg+hb;
   }

   var sr,sg,sb,er,eg,eb,step,at;

   function setBG()
   {
    setbgColor(Math.Floor(sr * ((step-at)/step) + er * (at/step)),
               Math.Floor(sg * ((step-at)/step) + eg * (at/step)),
               Math.Floor(sb * ((step-at)/step) + eb * (at/step)));
    at++;
    if (at<=step) setTimeout("setBG()",1);
   }

   function fade(a,b,c,d,e,f,g)
   {
    sr=a; sg=b; sb=c; er=d; eg=e; eb=f; step=g;
    at=1;
    setBG();
   }

   function makevisible(cur,which) {
    if (which==0) {
    	if (is_ie) cur.filters.alpha.opacity=100;
    	else       cur.style.opacity=1;
    } else {
    	if (is_ie) cur.filters.alpha.opacity=50;
    	else       cur.style.opacity=0.5;
    }
   }

   var BigWin=null;

   function openFlyer(str) {
       BigWin= window.open("pinflyer.php?image="+str, "BigWin","Width=300,Height=300,Left=0,Top=0,toolbar=no,scrollbars=yes,resizable=no,status=no");
   }
   
   function openbig(str) {
       BigWin= window.open("pindetail.php?itemid="+str, "BigWin","Width=270,Height=270,Left=0,Top=0,toolbar=no,scrollbars=no,resizable=no,status=no");
   }

   function openInput() {
       BigWin= window.open("pin_add.php?mode=input", "BigWin","Width=450,Height=300,Left=100,Top=100,toolbar=no,scrollbars=no,resizable=no,status=no");
   }

//-->
