var xmlHttp;
var site_location;

//site_location="http://computer7/grantjhonson1/";
site_location="http://www.grantjohnson.net/";

function get_menu1(gallery_id,image_id)
{
var url=site_location+"big_image.php?sid="+Math.random()+"&gallery_id="+gallery_id+"&image_id="+image_id;
//alert();
xmlHttp=GetXmlHttpObject(stateChanged);
xmlHttp.open("GET", url , true);
xmlHttp.send(null);
//showmenu(id1,width1);
}


function  get_menu(gallery_id,image_id)
 {
   var ajaxRequest;  // The variable that makes Ajax possible!
   try{
       // Opera 8.0+, Firefox, Safari
       ajaxRequest = new XMLHttpRequest();
     } catch (e){
       // Internet Explorer Browsers
       try{
         ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
         try{
           ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
         } catch (e){
           // Something went wrong
           alert("Your browser broke!");
           return false;
         }
       }
     }
     // Create a function that will receive data sent from the server
     ajaxRequest.onreadystatechange = function()
      {
       if(ajaxRequest.readyState == 4)
        {
         var ajaxDisplay = document.getElementById("menu_container");
         ajaxDisplay.innerHTML = ajaxRequest.responseText;

         thisid=document.getElementById("menu_container");
         document.getElementById("gallery_desc").innerHTML="&nbsp;";
         thisid.style.visibility="visible";

    }
      }
     var url="/big_image.php?sid="+Math.random()+"&gallery_id="+gallery_id+"&image_id="+image_id;
     ajaxRequest.open("GET",url, true);
     ajaxRequest.send(null);
 }


function remmenu()
{
  var thisid;
  thisid=document.getElementById("menu_container");
  thisid.style.visibility="hidden";
}

function showmenu()
{
  var thisid;
  thisid=document.getElementById("menu_container");
  thisid.style.visibility='visible';
}

function getbrowsertype()
{
    var AgntUsr=navigator.userAgent.toLowerCase();
    var AppVer=navigator.appVersion.toLowerCase();
    var DomYes=document.getElementById?1:0;
    var NavYes=AgntUsr.indexOf('mozilla')!=-1&&AgntUsr.indexOf('compatible')==-1?1:0;
    var ExpYes=AgntUsr.indexOf('msie')!=-1?1:0;
    if (NavYes==1)
    return 1;
    if (ExpYes==1)
    return 0;
    
    
    //alert(NavYes);
    //alert(ExpYes);
}





function showmenu1()
{
 var thisid;
 thisid=document.getElementById("prodid"); 
 z=document.body.offsetWidth; 
 var btype;
 btype=getbrowsertype();
 if (btype==1)
 x=z-800+32;
 else
 x=z-800;
 //alert(z);

 x=x/2;
 x=x+110;
 x=parseInt(x,10);
 l=x+'px';
 if(thisid.style.left==l)
  thisid.style.visibility='visible';
}

function showmenu2()
{
 var thisid;
 thisid=document.getElementById("prodid1"); 
 z=document.body.offsetWidth; 
 var btype;
 btype=getbrowsertype();
 if (btype==1)
 x=z-800+32;
 else
 x=z-800;
 //alert(z);

 x=x/2;
 x=x+198;
 x=parseInt(x,10);
 l=x+'px';
 if(thisid.style.left==l)
  thisid.style.visibility='visible';
}


function showmenu3()
{
 var thisid;
 thisid=document.getElementById("prodid2"); 
 z=document.body.offsetWidth; 
 var btype;
 btype=getbrowsertype();
 if (btype==1)
 x=z-800+32;
 else
 x=z-800;
 //alert(z);

 x=x/2;
 x=x+550;
 x=parseInt(x,10);
 l=x+'px';
 if(thisid.style.left==l)
  thisid.style.visibility='visible';
}

function remmenu1()
{//alert("r");
 var thisid;
 thisid=document.getElementById("prodid"); 
 thisid.style.visibility='hidden';

}

function remmenu2()
{//alert("r");
 var thisid;
 thisid=document.getElementById("prodid1"); 
 thisid.style.visibility='hidden';

}

function remmenu3()
{//alert("r");
 var thisid;
 thisid=document.getElementById("prodid2"); 
 thisid.style.visibility='hidden';

}

function settdover(msg,msg1)
{//window.alert(msg);
var thiselem,thiselem1;
  thiselem=document.getElementById(msg);
  thiselem1=document.getElementById(msg1);
 thiselem.bgColor ='#225568';
 thiselem1.style.color='#ffffff';
 thiselem.style.cursor='hand';
}
function settdout(msg,msg1)
{var thiselem,thiselem1;
  thiselem=document.getElementById(msg);
  thiselem1=document.getElementById(msg1);
   thiselem.bgColor ='#ffbe26';
   thiselem1.style.color='#ffffff';
   //#b76e0a
}
