// Start Floating menu
function floatMenu()
{
 var newOffset=0;

/*
 if(document.all) //IE
 {
  if(document.body.scrollTop>5)
  {
   newOffset=document.body.scrollTop-145;
	alert(document.body.scrollTop);
  } else {
   newOffset=-145;
	alert(document.body.scrollTop);
  }

  if(newOffset>0) newOffset=0;
  newOffset+='px';
  document.all.subManu.style.pixelTop=newOffset;
  document.all.subPhoto.style.pixelTop=newOffset;
  document.all.subSerial.style.pixelTop=newOffset;

 } else if(document.layers) { //NS 4
  if(window.pageYOffset>5)
  {
   document.layers['menuHolder'].top=window.pageYOffset+5;
  } else {
   document.layers['menuHolder'].top=5;
  }
 } else if(document.getElementById) { //NS 6
*/
  if(window.pageYOffset>5)
  {
   newOffset=window.pageYOffset-145;
  } else {
   newOffset=-145;
  }
  if(newOffset>0) newOffset=0;
  newOffset+='px';
  document.getElementById('subManu').style.top=newOffset;
  document.getElementById('subPhoto').style.top=newOffset;
  document.getElementById('subSerial').style.top=newOffset;
// }
};

if(document.all)
{
 window.onscroll=floatMenu;
} else {
// setInterval('floatMenu()',100);
};
// End Floating Menu

/* GalPop */
function galPop(url,img_w,img_h)
{
	var etc_str="width="+(img_w+30)+",height="+(img_h+20)+",scrollbars,resizeable";
	var imgWin=window.open(url,"imgWin",etc_str);
	imgWin.moveTo( ((screen.width-img_w)/2) , ((screen.height-img_h)/2) );
	imgWin.focus();
	return false;
};

/* AJAX Method Check */
function checkAJAX()
{
 try { ajaxTMP=new XMLHttpRequest(); }// FF, Op8+, Safari
 catch(e) {
  try { ajaxTMP=new ActiveXObject("Msxml2.XMLHTTP"); }// IE6+
  catch(e) {
   try { ajaxTMP=new ActiveXObject("Microsoft.XMLHTTP"); }// IE5+
   catch(e) {
    alert("Your browser does not support AJAX!");
    return false;
   }
  }
 }
 return ajaxTMP;
};
/**/

/* Make Ajax Request: Misc Page Edit (Manufacturer -> Model) */
function ajaxGalPic(picID)
{
 var ajaxReq=checkAJAX();

 ajaxReq.onreadystatechange=function() { if(ajaxReq.readyState==4) { document.getElementById("galMedPic").innerHTML=ajaxReq.responseText; } }

 ajaxReq.open("GET","/gallery.ajax.php?p="+picID,true);
 ajaxReq.send(null);
};
/**/

/** AJAX End **/
