LL_infoID = new Array();


// Now that you've left the above line as is, the following
//   section needs to be customized:
//
// Between the quotation marks, on the lines below, type the ID's
//   of the layered information text you've created. The number
//   between the square brackets is the number you've assigned to
//   the information items. Add/Delete lines as needed, adjusting
//   the numbers between square brackets to be sequential, starting
//   with the digit 1

LL_infoID[1] = "main_url";
LL_infoID[2] = "captcha";
LL_infoID[3] = "gem_url";
LL_infoID[4] = "redir_type";
LL_infoID[5] = "pass_protect";
LL_infoID[6] = "name";
LL_infoID[7] = "pass";
LL_infoID[8] = "email";
LL_infoID[9] = "change_url";
LL_infoID[10] = "old_gem_url";
LL_infoID[11] = "old_pass";


//
// End of customization sections.
///////////////////////////////////////////////////////////////


LL_infoID[0] = "unused";
bNS4 = bNS6 = bIE = bOPERA = false;
if     (navigator.userAgent.indexOf("Opera") != -1) { bOPERA = true; }
else if(navigator.userAgent.indexOf("Gecko") != -1) { bNS6 = true;   }
else if(document.layers)                            { bNS4 = true;   }
else if(document.all)                               { bIE = true;    }

LLx = LLxx = LLy = LLyy = 0;
var LL_mousex;
var LL_mousey;
var STO = null;
var SET = false;
var cID = '';
if(bNS4 || bNS6 || bOPERA) { document.captureEvents(Event.MOUSEMOVE); }
document.onmousemove = LL_getmouseposition;


// Functions used by all browsers

function Null() { return; }

function LL_getmouseposition(e)
{
if(bIE || bOPERA) {
	LL_mousex = event.clientX;
	LL_mousey = event.clientY;
	}
else if(bNS6 || bNS4) {
	LL_mousex = e.pageX;
	LL_mousey = e.pageY;
	}
} // LL_getmouseposition()




// Functions to relay browser type to custom functions

function LL_showinfo(m_section) {
LL_hideallinfo();
if(cID != m_section) { SET = false; }
cID = m_section;
     if(bIE)    { LL_bIE_showit(m_section); }
else if(bNS6)   { LL_bNS6_showit(m_section); }
else if(bOPERA) { LL_bOPERA_showit(m_section); }
else if(bNS4)   { LL_bNS4_showit(m_section); }
} // LL_showinfo()

function LL_hideallinfo(m_section) {
clearTimeout(STO);
     if(bIE)    { LL_bIE_hideallinfo(); }
else if(bNS6)   { LL_bNS6_hideallinfo(); }
else if(bOPERA) { LL_bOPERA_hideallinfo(); }
else if(bNS4)   { LL_bNS4_hideallinfo(); }
} // LL_hideallinfo()




// IE functions

function LL_bIE_hidesection(m_section) {
if(LL_mouseinrectangle()) { return; }
eval(LL_infoID[m_section] + '.style.visibility="hidden"');
} // LL_bIE_hidesection()

function LL_bIE_hideallinfo() {
for(i = 1; i < LL_infoID.length; i++) {
	eval(LL_infoID[i] + '.style.visibility="hidden"');
	}
} // LL_bIE_hideallinfo()

function LL_bIE_showit(m_section) {
	LL_bIE_hideallinfo();
	var x = LL_mousex + 1;
	if(x < 0) { x = 0; }
	var y = LL_mousey + 20;
	if(y < 0) { y = 0; }
	if(SET == false) {
		eval(LL_infoID[m_section] + '.style.left="' + x + '"');
		eval(LL_infoID[m_section] + '.style.top="' + y + '"');
		}
	eval(LL_infoID[m_section] + '.style.visibility="visible"');
	LLx = eval(LL_infoID[m_section] + '.style.pixelLeft');
	LLxx = eval(LL_infoID[m_section] + '.scrollWidth') + LLx;
	LLy = eval(LL_infoID[m_section] + '.style.pixelTop');
	LLyy = eval(LL_infoID[m_section] + '.scrollHeight') + LLy;
	SET = true;
	clearTimeout(STO);
	STO = setTimeout('SET = false',2000);
} // LL_bIE_showit()



// Netscape 6 functions

function LL_bNS6_hidesection(m_section) {
if(LL_mouseinrectangle()) { return; }
document.getElementById(LL_infoID[m_section]).style.visibility="hidden";
} // LL_bNS6_hidesection()

function LL_bNS6_hideallinfo() {
for(i = 1; i < LL_infoID.length; i++) {
	document.getElementById(LL_infoID[i]).style.visibility="hidden";
	}
} // LL_bNS6_hideallinfo()

function LL_bNS6_showit(m_section) {
	LL_bNS6_hideallinfo();
	var x = LL_mousex + 1;
	if(x < 0) { x = 0; }
	var y = LL_mousey + 20;
	if(y < 0) { y = 0; }
	if(SET == false) {
		document.getElementById(LL_infoID[m_section]).style.left = x + 'px';
		document.getElementById(LL_infoID[m_section]).style.top = y + 'px';
		}
	document.getElementById(LL_infoID[m_section]).style.visibility="visible";
	var padding = 0;
	if(parseInt(document.getElementById(LL_infoID[m_section]).style.padding) > 0) { padding = parseInt(document.getElementById(LL_infoID[m_section]).style.padding) * 2; }
	LLx = parseInt(document.getElementById(LL_infoID[m_section]).style.left);
	LLxx = parseInt(document.getElementById(LL_infoID[m_section]).style.width) + LLx + padding;
	LLy = parseInt(document.getElementById(LL_infoID[m_section]).style.top);
	LLyy = parseInt(document.getElementById(LL_infoID[m_section]).style.height) + LLy + padding;
	SET = true;
	clearTimeout(STO);
	STO = setTimeout('SET = false',2000);
} // LL_bNS6_showit()



// Opera 6 functions
function LL_bOPERA_hidesection(m_section) {
if(LL_mouseinrectangle()) { return; }
document.getElementById(LL_infoID[m_section]).style.visibility="hidden";
} // LL_bOPERA_hidesection()

function LL_bOPERA_hideallinfo() {
for(i = 1; i < LL_infoID.length; i++) {
	document.getElementById(LL_infoID[i]).style.visibility="hidden";
	}
} // LL_bOPERA_hideallinfo()

function LL_bOPERA_showit(m_section) {
	LL_bOPERA_hideallinfo();
	var x = LL_mousex + 1;
	if(x < 0) { x = 0; }
	var y = LL_mousey + 20;
	if(y < 0) { y = 0; }
	if(SET == false) {
		document.getElementById(LL_infoID[m_section]).style.left = x + 'px';
		document.getElementById(LL_infoID[m_section]).style.top = y + 'px';
		}
	document.getElementById(LL_infoID[m_section]).style.visibility="visible";
	var padding = 0;
	if(parseInt(document.getElementById(LL_infoID[m_section]).style.padding) > 0) { padding = parseInt(document.getElementById(LL_infoID[m_section]).style.padding) * 2; }
	LLx = parseInt(document.getElementById(LL_infoID[m_section]).style.left);
	LLxx = parseInt(document.getElementById(LL_infoID[m_section]).style.width) + LLx + padding;
	LLy = parseInt(document.getElementById(LL_infoID[m_section]).style.top);
	LLyy = parseInt(document.getElementById(LL_infoID[m_section]).style.height) + LLy + padding;
	SET = true;
	clearTimeout(STO);
	STO = setTimeout('SET = false',2000);
} // LL_bOPERA_showit()



// Netscape 4 functions

function LL_bNS4_hidesection(m_section) {
if(LL_mouseinrectangle()) { return; }
eval('document.' + LL_infoID[m_section] + '.visibility="hide"');
} // LL_bNS4_hidesection()

function LL_bNS4_hideallinfo() {
for(i = 1; i < LL_infoID.length; i++) {
	eval('document.' + LL_infoID[i] + '.visibility="hide"');
	}
} // LL_bNS4_hideallinfo()

function LL_bNS4_showit(m_section) {
	LL_bNS4_hideallinfo();
	var x = LL_mousex + 1;
	if(x < 0) { x = 0; }
	var y = LL_mousey + 20;
	if(y < 0) { y = 0; }
	if(SET == false) {
		eval('document.' + LL_infoID[m_section] + '.left="' + x + '"');
		eval('document.' + LL_infoID[m_section] + '.top="' + y + '"');
		}
	eval('document.' + LL_infoID[m_section] + '.visibility="show"');
	LLx = eval('parseInt(document.' + LL_infoID[m_section] + '.left)');
	LLxx = eval('parseInt(document.' + LL_infoID[m_section] + '.clip.width)') + LLx;
	LLy = eval('parseInt(document.' + LL_infoID[m_section] + '.top)');
	LLyy = eval('parseInt(document.' + LL_infoID[m_section] + '.clip.height)') + LLy;
	SET = true;
	clearTimeout(STO);
	STO = setTimeout('SET = false',2000);
} // LL_bNS4_showit()








   function makeRequest(url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      http_request.onreadystatechange = alertContents;
      http_request.open('GET', url + parameters, true);
      http_request.send(null);
   }

   function alertContents() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
            document.getElementById('myspan').innerHTML = result;
         } else {
            alert('There was a problem with the request.');
         }
      }
   }


   function get(obj) {
      var getstr = "?";
      for (i=0; i<obj.getElementsByTagName("input").length; i++) {
          if (obj.getElementsByTagName("input")[i].type == "text") {
               getstr += obj.getElementsByTagName("input")[i].name + "=" +
                   encodeURIComponent(obj.getElementsByTagName("input")[i].value) + "&";
          }
          if (obj.getElementsByTagName("input")[i].type == "hidden") {
               getstr += obj.getElementsByTagName("input")[i].name + "=" +
                   obj.getElementsByTagName("input")[i].value + "&";
          }
          if (obj.getElementsByTagName("input")[i].type == "password") {
               getstr += obj.getElementsByTagName("input")[i].name + "=" +
                   obj.getElementsByTagName("input")[i].value + "&";
          }
          if (obj.getElementsByTagName("input")[i].type == "checkbox") {
               if (obj.getElementsByTagName("input")[i].checked) {
                   getstr += obj.getElementsByTagName("input")[i].name + "=" +
                   obj.getElementsByTagName("input")[i].value + "&";
               } else {
                   getstr += obj.getElementsByTagName("input")[i].name + "=&";
               }
          }
          if (obj.getElementsByTagName("input")[i].type == "radio") {
               if (obj.getElementsByTagName("input")[i].checked) {
                  getstr += obj.getElementsByTagName("input")[i].name + "=" +
                   obj.getElementsByTagName("input")[i].value + "&";
               }
          }
          if (obj.getElementsByTagName("input")[i].tagName == "SELECT") {
                var sel = obj.getElementsByTagName("input")[i];
                getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&";
          }

      }
      for (i=0; i<obj.getElementsByTagName("SELECT").length; i++) {
         if (obj.getElementsByTagName("SELECT")[i].tagName == "SELECT") {
            var sel = obj.getElementsByTagName("SELECT")[i];
            getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&";
         }
      }
      makeRequest('js.php', getstr);
   }


