// Copyright 2010 - Mark Rasmussen - Rare Collections - 612-961-4747 - mark@rare-collections.com - www.rare-collections.com
var SiteTitle = ""; var Menu = ""; var Link = ""; var Here = ""; var Align = ""; var Quality = ""; var Slides = 0; var SlidesBase = ""; var SlidesDelay = 0; var Ref = '';
var FontMin = 10; var FontMax = 22;
var MinWidth = 289; var MaxWidth = "";
var PageDIV; var PageHTML = ""; var InqDIV; var FakeCookie = "";
var HideDIV; var TopHTML = "";
var Resizing = 0; var CurrentX = 0; var ScreenWidth;
var ContentWidth = 1024; var InitialWidth = 0;
var SlideTimer = 0; var LoadTimer = 0; var Slide = 0; var LoadSlide = 0;
var SlidesBuffer = new Array(); var SlideRequested = new Array();
var IE; var MouseX = 0; var MouseY = 0; var HalfX = 0; var HalfY = 0; var TipDIV; var AutoTimer; var OnTip = false;
var Email_RE = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|tel|gov|arpa|biz|store|travel|web|aero|name|coop|nato|nom|pro|jobs|info|firm|pro|museum))$/;
var Phone_RE = /^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$/;
function Init() {
   TipDIV  = document.getElementById('TipDIV');   TipDIV.style.top  = '0px'; TipDIV.style.left  = '0px';
   HideDIV = document.getElementById('HideDIV');  HideDIV.style.top = '0px'; HideDIV.style.left = '0px';
   PageDIV = document.getElementById('PageDIV');  PageDIV.style.top = '0px'; PageDIV.style.left = '0px';
   InqDIV  = document.getElementById('InqDIV');   InqDIV.style.top  = '0px'; InqDIV.style.left  = '0px';
   ScreenWidth = screen.width; if (typeof(window.innerWidth) != 'undefined') {if (window.innerWidth > ScreenWidth) {ScreenWidth = window.innerWidth;}}
   var args = HideDIV.innerHTML.substr(0,HideDIV.innerHTML.indexOf("-->")) + ";sitetitle=;menu=;link=;here=;maxwidth=;align=;quality=;slides=;slidesbase=;slidesdelay=;-->"; var arg;
   arg = args.substr(args.indexOf("sitetitle=")+10);   SiteTitle   = arg.substr(0, arg.indexOf(";")); if (SiteTitle == '') SiteTitle=document.title; else document.title=SiteTitle;
   arg = args.substr(args.indexOf("menu=")+5);         Menu        = arg.substr(0, arg.indexOf(";"));
   arg = args.substr(args.indexOf("link=")+5);         Link        = arg.substr(0, arg.indexOf(";")); // Need to crop if ","
   arg = args.substr(args.indexOf("here=")+5);         Here        = arg.substr(0, arg.indexOf(";")); if (Here != "misc")     {document.title = document.title + " - " + Here.substr(0,1).toUpperCase() + Here.substr(1,50).toLowerCase();}
   arg = args.substr(args.indexOf("maxwidth=")+9);     MaxWidth    = arg.substr(0, arg.indexOf(";")); if (MaxWidth == "")     {MaxWidth = ScreenWidth - 29;}
   arg = args.substr(args.indexOf("align=")+6);        Align       = arg.substr(0, arg.indexOf(";")); if (Align == "")        {Align = 'center';}
   arg = args.substr(args.indexOf("quality=")+8);      Quality     = arg.substr(0, arg.indexOf(";")); if (Quality == "")      {Quality = 75;}
   arg = args.substr(args.indexOf("slides=")+7);       Slides      = arg.substr(0, arg.indexOf(";")); if (Slides == "")       {Slides = 0;}
   arg = args.substr(args.indexOf("slidesbase=")+11);  SlidesBase  = arg.substr(0, arg.indexOf(";")); if (SlidesBase == "")   {Slides = 0;}
   arg = args.substr(args.indexOf("slidesdelay=")+12); SlidesDelay = arg.substr(0, arg.indexOf(";")); if (SlidesDelay < 4000) {SlidesDelay = 4000;}
   InitialWidth = Math.min(ScreenWidth,MaxWidth); if (InitialWidth < MinWidth) {InitialWidth = MinWidth;} else if (InitialWidth > MaxWidth) {InitialWidth = MaxWidth;}
   PageHTML = "";
   if (/^(home|news|about|contact|misc)$/.test(Here) && Menu != 'none') {
      PageHTML = "<table border='0' cellpadding='1' cellspacing='0' class='menu' style='width:ZZRWpx;font-size:ZZFSpx'>";
      PageHTML += "<tr><td align='left'>";
      if (Here == 'home') {PageHTML += "<span class='here'>Home</span></td>";
      } else {PageHTML += "<a href='home.shtml'>Home</a></td>";}
      PageHTML += "<td align='right'>";
      if (Menu != '') {
         var work_menu = Menu.split(",");
         var work_link = Link.split(",");
         for (var m=0; m<work_menu.length&&work_link.length; m++) {
             PageHTML += "<a href='" + work_link[m] + "'>" + work_menu[m] + "</a>&nbsp;&nbsp;";
         }
      }
      if (Here == 'news') {PageHTML += "<span class='here'>News</span>&nbsp;&nbsp;";
      } else {PageHTML += "<a href='news.shtml'>News</a>&nbsp;&nbsp;";}
      if (Here == 'about') {PageHTML += "<span class='here'>About</span>&nbsp;&nbsp;";
      } else {PageHTML += "<a href='about.shtml'>About</a>&nbsp;&nbsp;";}
      if (Here == 'contact') {PageHTML += "<span class='here'>Contact</span>";
      } else {PageHTML += "<a href='contact.shtml'>Contact</a>";}
      PageHTML = PageHTML + "</td></tr></table>";
   }
   if (Here == 'ref') {
      Ref = document.location.href;
      Ref = Ref.substr(Ref.indexOf("?")+1);
      Ref = Ref.replace(/_/g, ' ');
   }
   TopHTML = HideDIV.innerHTML.substr(HideDIV.innerHTML.indexOf("-->")+3);
   TopHTML = TopHTML.replace(/ZZSLIDESHOW/, "<img id='Slides' class='image' src='./utils/zzimg01.cgi?&w=ZZIW&q=" + Quality + "&s=/imagesZZSUB/ZZSLIDESBASE1.jpg' width='ZZRW'>");
   TopHTML = TopHTML.replace(/ZZSITE/g, Site); TopHTML = TopHTML.replace(/ZZLINK/g, Link); TopHTML = TopHTML.replace(/ZZMENU/g, Menu); TopHTML = TopHTML.replace(/ZZSUB/g, Sub);
   TopHTML = TopHTML.replace(/ZZSLIDESBASE/g, SlidesBase); TopHTML = TopHTML.replace(/ZZIW/g, InitialWidth); TopHTML = TopHTML.replace(/ZZQUALITY/g, Quality);
   TopHTML = TopHTML.replace(/ZZREF/g, Ref); TopHTML = TopHTML.replace(/ZZADMIN/g, "");
   TopHTML = TopHTML.replace(/(<!--|-->)/g, "");
   PageHTML += "<div style='width:100%;display:block'><div align='center'>";
   PageHTML += "<div align='" + Align + "' class='top' style='width:ZZRWpx'>" + TopHTML + "</div></div></div>";
   if (typeof(window.innerWidth) != 'undefined') {
      ContentWidth  = "Math.min(window.innerWidth,document.documentElement.clientWidth,MaxWidth)"; ViewPortWidth = "Math.min(window.innerWidth,document.documentElement.clientWidth)";
      ContentHeight = "Math.min(window.innerHeight,document.documentElement.clientHeight)"; ViewPortHeight = "Math.min(window.innerHeight,document.documentElement.clientHeight)";
   } else if (typeof(document.documentElement.clientWidth) != 'undefined') {
      ContentWidth  = "Math.min(document.documentElement.clientWidth,MaxWidth)"; ViewPortWidth = "Math.min(document.documentElement.clientWidth)";
      ContentHeight = "document.documentElement.clientHeight"; ViewPortHeight = "document.documentElement.clientHeight";
   } else {
      ContentWidth  = "Math.min(document.getElementsByTagName('body')[0].clientWidth,MaxWidth)"; ViewPortWidth = "Math.min(document.getElementsByTagName('body')[0].clientWidth)";
      ContentHeight = "document.getElementsByTagName('body')[0].clientHeight"; ViewPortHeight = "document.getElementsByTagName('body')[0].clientHeight";
   }
   ResizePage(); window.onresize = function(){ResizePage();}
   if (document.getElementById('Slides') != null && Slides > 1 && SlidesBase != "") {
      for (var i=1; i<=Slides; i++) {SlidesBuffer[i] = new Image(); SlideRequested[i] = false;}
      Slide = 1; LoadSlide = 1; SlideTimer = setTimeout("SwitchSlide()",SlidesDelay); LoadTimer = setTimeout("LoadSlides()",2000);
   }
   IE = document.all?true:false; if (window.addEventListener) {document.addEventListener("mousemove",GetMouseXY,false);} else if (window.attachEvent) {document.attachEvent("onmousemove",GetMouseXY);}
   AutoHide();
}
function ResizePage() {
   if (Resizing) {return;}
   if (CurrentX == eval(ContentWidth)) {return;}
   Resizing = 1; CurrentX = eval(ContentWidth);
   var resizewidth = CurrentX - 21; if (resizewidth < MinWidth) {resizewidth = MinWidth;} else if (resizewidth > MaxWidth) {resizewidth = MaxWidth;}
   var resizehalf = Math.floor(resizewidth/2);
   HalfX = Math.floor(eval(ViewPortWidth)/2);
   HalfY = Math.floor(eval(ViewPortHeight)/2);
   PageHTML = PageHTML.replace(/ZZIR/g, resizewidth); TopHTML = TopHTML.replace(/ZZIR/g, resizewidth);
   var fontsize = Math.floor(CurrentX * .0275); if (fontsize < FontMin) {fontsize = FontMin;} else if (fontsize > FontMax) {fontsize = FontMax;}
   var html = PageHTML.replace(/ZZFS/g, fontsize); html = html.replace(/ZZ50RW/g, resizehalf); PageDIV.innerHTML = html.replace(/ZZRW/g, resizewidth);
   Resizing = 0;
}
function GetMouseXY(e) {
   if (IE) {
      MouseX = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; MouseY = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
   } else {
      MouseX = e.pageX; MouseY = e.pageY;
   }
}
function AutoHide() {
   if (OnTip){OnTip=false;TipDIV.style.visibility='hidden';TipDIV.style.top='0px';TipDIV.style.left='0px';}
   AutoTimer=setTimeout('AutoHide()',2000);
}
function ShowTip(text) {
   TipDIV.innerHTML=text;
   if (MouseX > HalfX){TipDIV.style.left=MouseX-TipDIV.clientWidth-5+'px';} else TipDIV.style.left=MouseX+'px';
   if (MouseY > HalfY){TipDIV.style.top=MouseY-32+'px';} else TipDIV.style.top=MouseY+24+'px';
   TipDIV.style.visibility='visible'; OnTip=true;
}
function HideTip() {
   TipDIV.style.visibility='hidden'; OnTip=false;
   TipDIV.style.top='0px'; TipDIV.style.left='0px';
}
function LoadSlides() {
   if (SlideRequested[LoadSlide] && !SlidesBuffer[LoadSlide].complete) {LoadTimer = setTimeout("LoadSlides()",1000); return;}
   LoadSlide++; if (LoadSlide > Slides) {LoadSlide = 1;}
   SlidesBuffer[LoadSlide].src = "./utils/zzimg01.cgi?&w=" + InitialWidth + "&q=" + Quality + "&s=/images" + Sub + "/" + SlidesBase + LoadSlide + ".jpg";
   SlideRequested[LoadSlide] = true;
   if (LoadSlide != 1) {LoadTimer = setTimeout("LoadSlides()",1000);}
}
function SwitchSlide() {
   if (!document.getElementById('Slides').complete) {SlideTimer = setTimeout("SwitchSlide()",1000); return;}
   if (Slide < Slides && !SlidesBuffer[Slide + 1].complete) {SlideTimer = setTimeout("SwitchSlide()",1000); return;}
   Slide++; if (Slide > Slides) {Slide = 1;}
   document.getElementById('Slides').src = SlidesBuffer[Slide].src;
   SlideTimer = setTimeout("SwitchSlide()",SlidesDelay);
}

function OpenRequest() {
   HideTip();
   var html = "<div style='position:absolute;width:100%;top:0px;left:0px'>";
   html += "<div align='center' class='inqtxt' style='width:307px'>";
   html += "<div align='left' style='padding:4px'>";
   html += "<div style='width:274px'><b>Mailing List Request / General Inquiry</b></div>";
   html += "<br><b>Email Address <span style='color:green'>*</span></b>";
   html += "<br><input type='text' id='i_email' title='Email Address - Required' style='width:293px'>";
   html += "<br><b>Phone Number <span style='color:green'>*</span></b>";
   html += "<br><input type='text' id='i_phone' title='Phone Number - Required' style='width:293px'>";
   html += "<br><b><div style='width:108px; float:left'>First Name <span style='color:green'>*</span></div><div style='width:168px; float:left'>Last Name <span style='color:green'>*</span></div>&nbsp;Mi</b>";
   html += "<br><input type='text' id='i_first' title='First Name - Required' style='width:100px'>";
   html += "&nbsp;<input type='text' id='i_last' title='Last Name - Required' style='width:160px'>";
   html += "&nbsp;<input type='text' id='i_middle' title='Middle Initial' style='width:15px'>";
   html += "<br><b>Note <span style='color:green'>*</span></b>";
   html += "<br><textarea id='i_note' title='Note - Required' class='input' style='width:293px; height:35px;'>Please add me to the mailing list.</textarea>";
   html += "<br><b>Company Name</b>";
   html += "<br><input type='text' title='Company Name' id='i_company' style='width:293px'>";
   html += "<br><b>Address Line 1</b>";
   html += "<br><input type='text' title='Address Line 1' id='i_addr1' style='width:293px'>";
   html += "<br><b>Address Line 2</b>";
   html += "<br><input type='text' title='Address Line 2' id='i_addr2' style='width:293px'>";
   html += "<br><b><div style='width:148px; float:left'>City</div>&nbsp;State / Province</b>";
   html += "<br><input type='text' id='i_city' title='City' style='width:142px'>";
   html += "&nbsp;<input type='text' id='i_state' title='State / Province' style='width:142px'>";
   html += "<br><b><div style='width:148px; float:left'>Zip / Postal Code</div>&nbsp;Country</b>";
   html += "<br><input type='text' id='i_zip' title='Zip / Postal Code' style='width:142px'>";
   html += "&nbsp;<input type='text' id='i_country' title='Country' style='width:142px'>";
   html += "<br><input type='checkbox' id='i_cookie' title='Uncheck if on public computer' class='adminchk'> Remember me after closing the browser";
   html += "<br><br><div align='center' style='width:292px; padding:4px; height:20px;'><span class='inqbtn' onclick='PostRequest()'>Send Request / Inquiry</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class='inqbtn' style='color:red' onclick='CloseRequest()'>Cancel</span></div></div>";
   html += "<div style='position:absolute;width:100%;top:6px;left:0px'>";
   html += "<div align='center' style='width:307px'>";
   html += "<div style='float:right;padding:4px;'><span class='closebtn' onclick='CloseRequest()'>&nbsp;X&nbsp;</span></div></div></div></div></div></div></div>";
   InqDIV.innerHTML = html;
   document.getElementById('i_cookie').checked = true;
   GetRequestCookies();
   var divtop = document.body.scrollTop + document.documentElement.scrollTop;
   if (divtop < 0) {divtop = 0;}
   InqDIV.style.top = divtop + 'px';
   InqDIV.style.visibility = 'visible';
   var obj = document.getElementById("i_email");
   setTimeout(function(){obj.focus();},1); obj.focus();
}

function SetRequestCookies() {
   var date = new Date();
   date.setTime(date.getTime()+31622400000);
   var expires = "~; expires=" + date.toGMTString() + "; path=/";
   var savecookie = false; if (document.getElementById('i_cookie').checked) {savecookie = true;}
   FakeCookie =  "i_host="      + Host      + "~"; if (savecookie) {document.cookie = "i_host="      + Host      + expires;}
   FakeCookie += "i_site="      + Site      + "~"; if (savecookie) {document.cookie = "i_site="      + Site      + expires;}
   FakeCookie += "i_sub="       + Sub       + "~"; if (savecookie) {document.cookie = "i_sub="       + Sub       + expires;}
   FakeCookie += "i_sitetitle=" + SiteTitle + "~"; if (savecookie) {document.cookie = "i_sitetitle=" + SiteTitle + expires;}
   FakeCookie += "i_menu="      + Here      + "~"; if (savecookie) {document.cookie = "i_menu="      + Here      + expires;}
   FakeCookie += "i_email="   + document.getElementById("i_email").value   + "~"; if (savecookie) {document.cookie = "i_email="   + escape(document.getElementById("i_email").value)   + expires;}
   FakeCookie += "i_phone="   + document.getElementById("i_phone").value   + "~"; if (savecookie) {document.cookie = "i_phone="   + escape(document.getElementById("i_phone").value)   + expires;}
   FakeCookie += "i_last="    + document.getElementById("i_last").value    + "~"; if (savecookie) {document.cookie = "i_last="    + escape(document.getElementById("i_last").value)    + expires;}
   FakeCookie += "i_first="   + document.getElementById("i_first").value   + "~"; if (savecookie) {document.cookie = "i_first="   + escape(document.getElementById("i_first").value)   + expires;}
   FakeCookie += "i_middle="  + document.getElementById("i_middle").value  + "~"; if (savecookie) {document.cookie = "i_middle="  + escape(document.getElementById("i_middle").value)  + expires;}
   FakeCookie += "i_note="    + document.getElementById("i_note").value    + "~"; if (savecookie) {document.cookie = "i_note="    + escape(document.getElementById("i_note").value)    + expires;}
   FakeCookie += "i_company=" + document.getElementById("i_company").value + "~"; if (savecookie) {document.cookie = "i_company=" + escape(document.getElementById("i_company").value) + expires;}
   FakeCookie += "i_addr1="   + document.getElementById("i_addr1").value   + "~"; if (savecookie) {document.cookie = "i_addr1="   + escape(document.getElementById("i_addr1").value)   + expires;}
   FakeCookie += "i_addr2="   + document.getElementById("i_addr2").value   + "~"; if (savecookie) {document.cookie = "i_addr2="   + escape(document.getElementById("i_addr2").value)   + expires;}
   FakeCookie += "i_city="    + document.getElementById("i_city").value    + "~"; if (savecookie) {document.cookie = "i_city="    + escape(document.getElementById("i_city").value)    + expires;}
   FakeCookie += "i_state="   + document.getElementById("i_state").value   + "~"; if (savecookie) {document.cookie = "i_state="   + escape(document.getElementById("i_state").value)   + expires;}
   FakeCookie += "i_zip="     + document.getElementById("i_zip").value     + "~"; if (savecookie) {document.cookie = "i_zip="     + escape(document.getElementById("i_zip").value)     + expires;}
   FakeCookie += "i_country=" + document.getElementById("i_country").value + "~"; if (savecookie) {document.cookie = "i_country=" + escape(document.getElementById("i_country").value) + expires;}
}

function GetRequestCookies() {
   var cookie; var cookies = unescape(document.cookie) + FakeCookie + "~i_email=~i_phone=~i_last=~i_first=~i_middle=~i_company=~i_addr1=~i_addr2=~i_city=~i_state=~i_zip=~i_country=~";
   cookie = cookies.substr(cookies.indexOf("i_email=")+8);    document.getElementById("i_email").value   = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_phone=")+8);    document.getElementById("i_phone").value   = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_last=")+7);     document.getElementById("i_last").value    = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_first=")+8);    document.getElementById("i_first").value   = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_middle=")+9);   document.getElementById("i_middle").value  = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_company=")+10); document.getElementById("i_company").value = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_addr1=")+8);    document.getElementById("i_addr1").value   = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_addr2=")+8);    document.getElementById("i_addr2").value   = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_city=")+7);     document.getElementById("i_city").value    = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_state=")+8);    document.getElementById("i_state").value   = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_zip=")+6);      document.getElementById("i_zip").value     = cookie.substr(0, cookie.indexOf("~"));
   cookie = cookies.substr(cookies.indexOf("i_country=")+10); document.getElementById("i_country").value = cookie.substr(0, cookie.indexOf("~"));
}

function PostRequest() {
   var phoneobj = document.getElementById("i_phone");
   phoneobj.value = phoneobj.value.replace(/\s/g,"");
   if (!Phone_RE.test(phoneobj.value) || phoneobj.value == "" || phoneobj.value == null) {
      setTimeout(function(){phoneobj.focus();phoneobj.select();},1);
      phoneobj.focus();
      phoneobj.select();
      alert("Please provide a valid Phone Number");
      return;
   }
   var emailobj = document.getElementById("i_email");
   emailobj.value = emailobj.value.replace(/\s/g,"");
   if (!Email_RE.test(emailobj.value) || emailobj.value == "" || emailobj.value == null) {
      setTimeout(function(){emailobj.focus();emailobj.select();},1);
      emailobj.focus();
      emailobj.select();
      alert("Please provide a valid Email Address");
      return;
   }
   var firstobj = document.getElementById("i_first");
   if (firstobj.value == "" || firstobj.value == null) {
      setTimeout(function(){firstobj.focus();firstobj.select();},1);
      firstobj.focus();
      firstobj.select();
      alert("Please provide your First and Last Name");
      return;
   }
   var lastobj = document.getElementById("i_last");
   if (lastobj.value == "" || lastobj.value == null) {
      setTimeout(function(){lastobj.focus();lastobj.select();},1);
      lastobj.focus();
      lastobj.select();
      alert("Please provide your First and Last Name");
      return;
   }
   var noteobj = document.getElementById("i_note");
   if (noteobj.value == "" || noteobj.value == null) {
      setTimeout(function(){noteobj.focus();noteobj.select();},1);
      noteobj.focus();
      noteobj.select();
      alert("Please provide a Note");
      return;
   }
   document.getElementById("i_email").value   = document.getElementById("i_email").value.replace(/~/g,"");
   document.getElementById("i_phone").value   = document.getElementById("i_phone").value.replace(/~/g,"");
   document.getElementById("i_last").value    = document.getElementById("i_last").value.replace(/~/g,"");
   document.getElementById("i_first").value   = document.getElementById("i_first").value.replace(/~/g,"");
   document.getElementById("i_middle").value  = document.getElementById("i_middle").value.replace(/~/g,"");
   document.getElementById("i_note").value    = document.getElementById("i_note").value.replace(/~/g,"");
   document.getElementById("i_company").value = document.getElementById("i_company").value.replace(/~/g,"");
   document.getElementById("i_addr1").value   = document.getElementById("i_addr1").value.replace(/~/g,"");
   document.getElementById("i_addr2").value   = document.getElementById("i_addr2").value.replace(/~/g,"");
   document.getElementById("i_city").value    = document.getElementById("i_city").value.replace(/~/g,"");
   document.getElementById("i_state").value   = document.getElementById("i_state").value.replace(/~/g,"");
   document.getElementById("i_zip").value     = document.getElementById("i_zip").value.replace(/~/g,"");
   document.getElementById("i_country").value = document.getElementById("i_country").value.replace(/~/g,"");
   SetRequestCookies();
   CloseRequest();
   alert("Thank you! Your Request / Inquiry is being sent.");
   var obj_xml = false; if (window.ActiveXObject) {try {obj_xml = new ActiveXObject("Msxml2.XMLHTTP");} catch(err) {obj_xml = false;}}
   if (!obj_xml && window.ActiveXObject) {try {obj_xml = new ActiveXObject("Microsoft.XMLHTTP");} catch(err) {obj_xml = false;}}
   if (!obj_xml) {try {obj_xml = new XMLHttpRequest();} catch(err) {obj_xml = false;}}
   if (obj_xml) {
      try {
         var args = encodeURIComponent(FakeCookie);
         obj_xml.open("POST", "/utils/zzreq01.cgi", true);
         obj_xml.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
         obj_xml.send("PostData=" + args);
         obj_xml.onreadystatechange=function()
         {
            if (obj_xml.readyState==4) {
               if (obj_xml.responseText != 0 || obj_xml.status != 200) {
                  alert("We are sorry, your request / inquiry did not go thru.\r\nThere may a connection issue or we may be performing maintenance.\r\nPlease try again later." + "\r\n\r\nResponseText='" + obj_xml.responseText + "'");
               }
            }
         }
      } catch(err){};
   }
}

function CloseRequest() {
   HideTip();
   InqDIV.style.visibility = 'hidden';
   InqDIV.innerHTML = "";
   InqDIV.style.top  = "0px";
   InqDIV.style.left = "0px";
}