var selected_menu=1;

var current_id=1;
var what_s = new Array();
what_s[1]="dl";
what_s[2]="dl";
what_s[3]="tut";


var cur_action="";

function del_select(id){
     if (id==0){return;}
             document.getElementById('tr_'+id+'_').style.backgroundImage="url(images/pixel.gif)";
             document.getElementById('tr_d_'+id+'_').style.backgroundImage="url(images/pixel.gif)";
             document.getElementById('tr_'+id+'_').style.backgroundImage="url(images/pixel.gif)";
             document.getElementById('b_l_'+id+'_').src='images/pixel.gif';
             document.getElementById('b_d_l_'+id+'_').src='images/pixel.gif';
             document.getElementById('b_d_r_'+id+'_').src='images/pixel.gif';
             document.getElementById('b_r_'+id+'_').src='images/pixel.gif';
             document.getElementById('b_d_'+id+'_').src='images/pixel.gif';
     return;
}
function set_select(id){
  //   if (document.findform.query){
   //          document.findform.query.focus();
  //   }
     if (current_id==id){return;}


     if (id==0){return;}

     if (id==2 || id==3){window.location = 'http://download.roro44.com';}


             del_select(current_id);
             document.getElementById('tr_d_'+id+'_').style.backgroundImage="url(images/b_d_bg.gif)";
             document.getElementById('tr_'+id+'_').style.backgroundImage="url(images/b_bg.gif)";
             document.getElementById('b_l_'+id+'_').src='images/b_l.gif';
             document.getElementById('b_r_'+id+'_').src='images/b_r.gif';
             document.getElementById('b_d_'+id+'_').src='images/b_d.gif';
             document.getElementById('b_d_l_'+id+'_').src='images/b_d_l.gif';
             document.getElementById('b_d_r_'+id+'_').src='images/b_d_r.gif';
             current_id=id;
             document.findform.type.value=what_s[id];
     return;
}
function submit_form(){
     if (document.findform.query.value!=''){
           //  document.location.href=document.findform.action.value+document.findform.findtext.value;
     }
}

set_select(selected_menu);


var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}



////
function initfadeIn(id, speed)
{
        var image = document.getElementById(id);
        setOpacity(image, 0);
        //image.style.visibility = "visible";
        fadeIn(id, 0, speed);
}

function initfadeOut(id, speed)
{
        var image = document.getElementById(id);
        setOpacity(image, 100);
        fadeOut(id, 100, speed);
}

function setOpacity(obj, opacity)
{
        obj.style.filter = "alpha(opacity:"+opacity+")";
        obj.style.KHTMLOpacity = opacity/100;
        obj.style.MozOpacity = opacity/100;
        obj.style.opacity = opacity/100;
}

function fadeIn(objId, opacity, speed)
{
        if (document.getElementById)
        {
                obj = document.getElementById(objId);
                if (opacity <= 100)
                {
                        setOpacity(obj, opacity);
                        opacity += 20;
                        window.setTimeout("fadeIn(\""+objId+"\", "+opacity+", "+speed+")", speed);
                }
        }
}

function fadeOut(objId, opacity, speed)
{
        if (document.getElementById)
        {
                obj = document.getElementById(objId);
                if (opacity >= 0)
                {
                        setOpacity(obj, opacity);
                        opacity -= 20;
                        window.setTimeout("fadeOut(\""+objId+"\", "+opacity+", "+speed+")", speed);
                }
        }
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name + "=" + value + expires + "; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

function show_hide(id,other)
{
       var myelid = document.getElementById(id);
       var otherid = document.getElementById(other);

       active_menu = id;
       unactive_menu = other;

       if ( myelid.style.display == 'block' )
       {
       initfadeOut(id, 10);
       myelid.style.display = 'none';
       initfadeIn(other, 10);
       otherid.style.display = 'block';
       }
       else
       {

       initfadeOut(other, 10);
       myelid.style.display = 'block';
       initfadeIn(id, 10);
       otherid.style.display = 'none';

       }

}


function imagepreview(id)
{
         window.open(my_base + 'image.php?action=imagepreview&id='+id, '', 'resizable=1,HEIGHT=50,WIDTH=50, scrollbars=yes');
}

if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionI