/**************************************************************/
/* Common/Shared JavaScript File for www.onSiteMobility.com   */
/* Web Developer: Michael Fairley ( mfairley@mail.com )	      */
/* All Shared Client Side JavaScript Archived Here.           */
/* To Preserve the look and fill of this WebSite, pages from  */
/* this site that load in iframe will have the naming conven- */
/* tion of ( iframe_page.html ),,we may Build a mirrored Site */
/* that does not load in frames just incase we have the need  */
/* to break-out of the frameset....			      */
/**************************************************************/

//@_VARIABLES OF NAMES AND TITLES]
var a_Header = "\n======================================\n";
var a_Footer = "\n======================================\n";
var site_Title = "OnSite Mobility Corporation";
var site_Title1 = "OnSite Mobility Computer Service";
var site_Title2 = "Support / HelpDESK";
var site_Url = "www.OnSiteMobility.com";
var site_Distribution = "Global / Universal";


//@_VARIABLE ARRAY ONSITEMOBILITY COMPANY LOCATION] 
 var osm_Location = new Array();
	 osm_Location[0] = "594 Northwest 20th Avenue"; //address
	 osm_Location[1] = "Pompano Beach"; 		//city
	 osm_Location[2] = "FL";			//state abbreveated
	 osm_Location[3] = "Florida";			//state
	 osm_Location[4] = "33069-2741";		//zip code
//@_VARIABLE ARRAY OF ONSITEMOBILITY PHONE NUMBERS]
 var osm_Number = new Array();
	 osm_Number[0] = "(954)970-7203"; 	//Phone
	 osm_Number[1] = "(954)970-8631"; 	//Fax 
	 osm_Number[2] = "(954)970-7203"; 	//Tech Support		
//@_VARIABLE ARRAY ONSITEMOBILITY OF EMAIL ADDRESSES]
 var osm_Email = new Array();
	 osm_Email[0] = "sales@onsitemobility.com";
	 osm_Email[1] = "rma@onsitemobility.com";
	 osm_Email[2] = "support@onsitemobility.com"; //service
	 osm_Email[3] = "hkrause@onsitemobility.com"; //email
	 osm_Email[4] = "humanresource@onsitemobility.com";
	 osm_Email[5] = "scropper@dandh.com";
	 osm_Email[6] = "webmaster@onsitemobility.com";
	 osm_Email[7] = "accounting@onsitemobility.com";
	 osm_Email[8] = "jwkrause@onsitemobility.com";
	 osm_Email[9] = "sbsreports@onsitemobility.com";
	 osm_Email[10] = "Dr.Jykel_and_Mr.Hide@hotmail.com";
	 osm_Email[11] = "mfairley@mail.com";
//@_VARIABLE ARRAY ONSITEMOBILITY OF HTML PAGE-DOCUMENTS]
var osm_Page = new Array();
	 osm_Page[0] = "index.html";
	 osm_Page[1] = "iframe_business.html";
	 osm_Page[2] = "iframe_contactUs.html";
	 osm_Page[3] = "iframe_employment.html";
	 osm_Page[4] = "iframe_homepage.html";
	 osm_Page[5] = "iframe_networking.html";
	 osm_Page[6] = "iframe_privacyNotice.html";
	 osm_Page[7] = "iframe_products.html";
	 osm_Page[8] = "iframe_residential.html";
	 osm_Page[9] = "iframe_sales.html";
	 osm_Page[10] = "iframe_services.html";
	 osm_Page[11] = "iframe_srform.html";
	 osm_Page[12] = "iframe_emailform.html";
	 osm_Page[13] = "iframe_termsOfSales.html";
	 osm_Page[14] = "iframe_termsOfUse.html";
	 osm_Page[15] = "iframe_copyright.html";

//@_FUNCTION SHOW PAGE INFORMATION]
function PgInfo(){
var notice = "This Website Portal is protected by \ncopyright law and international treaties. Unauthorized \nreproduction or distribution of this WebSite, or any portion \nof it, may result in severe civil and criminal penalties, and will\n be prosecuted to the maximum extent possible under the law.\n" + site_Url + " © " + site_Title + "\nAll rights reserved.";
var pgInfo="" + a_Header + "" +
	   "[ WEBSITE DOCUMENT INFORMATION ]" +
	   "" + a_Footer + "" +
	   "WEBSITE OWNER: " + site_Title + " Copyright © " + year + "\n" +
	   "WEBSITE TITLE: " + site_Title + "\n" +
	   "WEBSITE URL: " + site_Url + "\n" +
	   "DOCUMENT TITLE: " + pageID + "\n" +
	   "DOCUMENT NAME: " + top.window.ObjIframe.document.frm_pgInfo.hidden_nameProp.value + "\n" +
	   "DOCUMENT TYPE: " + top.window.ObjIframe.document.frm_pgInfo.hidden_mimeType.value + "\n" +
	   "DOCUMENT SIZE: " + top.window.ObjIframe.document.frm_pgInfo.hidden_fileSize.value + "\n" +
	   "DOCUMENT CHARSET: " + top.window.ObjIframe.document.frm_pgInfo.hidden_Charset.value + "\n" +
	   "DOCUMENT DISTRIBUTION: " + site_Distribution + " \n" +
	   "DATE CREATED: " + top.window.ObjIframe.document.frm_pgInfo.hidden_fileCreatedDate.value + "\n" +
	   "DATE MODIFIED: " + top.window.ObjIframe.document.frm_pgInfo.hidden_lastModified.value + "" +
	   "" + a_Header + "" +
	   "NOTICE: " + notice + "" + 
	   "" + a_Footer + "";
		alert(pgInfo);
	return true;
} 
//@_FUNCTION WRITE DAY]
function writeDay(){
 document.write(""+longDayNames[now.getDay()]+", "+longMonthNames[now.getMonth()]+" "+now.getDate()+",  "+year+"");
}
//@_FUNCTION WRITE COPYRIGHT]
function copyRightWrite(){
	document.write("<p align='center' class='smInnerContLink'>");
	document.write("<a href='copyright.html' CLASS='smInnerContLink'>Copyright&nbsp;&copy;");
	document.write("&nbsp;" + year + "&nbsp;" + site_Title + ".&nbsp;&nbsp;");
	document.write("All rights reserved.</a><br>" + site_Url + "</p>");
}
//@_FUNCTION FULL MAILTO TEXT LINK]
function makeMailto(mail){
	document.write("<a href='mailto:" + mail + "?subject=Mailto Subject Text");
	document.write("&cc=mfairley@mail.com");
	document.write("&body=Mailto Message Here'>" + mail + "</a>");
}
//@_FUNCTION PARENT OR TOP LOAD IFRAME] 
function topLoadIframe(url){
	document.ObjIframe.location.href = url;
	return true;
}
//@_FUNCTION PARENT OR TOP LOAD IFRAME] 
function topNavToEmail(url,eMail){
	document.ObjIframe.location.href = url;
	document.eStorage.eName.value = eMail;
	return true;
}
//@_FUNCTION SIBLING OR CHILD LOAD IFRAME]
function sibLoadIframe(url){
	document.location.href = url;
}
//@_FUNCTION SIBLING OR CHILD LOAD IFRAME_EMAILFORM]
function embedNavToEmail(url,eMail){
	document.location.href = url;
	document.eStorage.eName.value = eMail;
	return true;
}
//@_FUNCTION PARENT LOAD IFRAME_EMAILFORM AND STORE TEST DATA]
function testEmailForm(url,eMail){
	document.ObjIframe.location.href = url;
	document.eStorage.eName.value = eMail;
	//document.eStorage.test_running.value = txt;
	return true;
}
//@_FUNCTION PARENT LOAD IFRAME_SERVICE_REQUEST_FORM AND STORE TEST DATA]
function testServiceForm(url,eMail,txt){
	document.ObjIframe.location.href = url;
	document.eStorage.eName_TestServFrm.value = eMail;
	//document.eStorage.test_running.value = txt;
	return true;
}
//@_FUNCTION SHOW USER THE PAGE LOACTION]
function showUserLocation(){
	alert("" + a_Header + "" +
		  "" + pageID + " Is the \nCurrent Document !" +
		  "" + a_Footer + "");
	return false;
}
//@_FUNCTION DISABLE PRINT BUTTON ON ALL FORM PAGES]
function openPrintDisabled(){
	alert("" + a_Header + "" +
		  "Document open print window function DISABLED !!\n" +
		  "Form Documents submits user DATA to SERVER !!\n" +
		  "for SECURITY reasons all form documents on this site,\nCANNOT BE PRINTED !!\n" +
		  "" + a_Footer + "");
	return false;
}
//@_FUNCTION OPEN NEW WINDOW USING printable Page]
function openPrint(){
	args = "width=550,height=600,left=20,top=20,scrollbars,resizable,top=0,left=0";
	window.open('pwindow_printPage.html',"",args);
	return false;
}
//@_FUNCTION OPEN NEW WINDOW USING printable Page for cgi]
function openCgiPrint(){
	args = "width=550,height=600,left=20,top=20,scrollbars,resizable,top=0,left=0";
	window.open('../printablePage.html',"",args);
	return false;
}
//@_FUNCTION OPEN NEW WINDOW USING ANY PAGE]
function MM_openBrWindow(theURL,winName,features){	
  window.open(theURL,winName,features);
}
//@_FUNCTION WINDOW RELOAD ON RESIZE]
function MM_reloadPage(init) {	
  if (init==true) with (navigator) {
  if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
     }
   } else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
//CALL FUNCTION NOW - READY TO RELOAD IF PAGE ERROR ONLOAD
MM_reloadPage(true);
//@_VARIABLES TO PREPAIR BROWSERS FOR LAYER OBJECTS]
  var nn4 = (document.layers);
  var ie4 = (document.all && !document.getElementById);
  var ie5=document.all&&document.getElementById;
  var ns6=document.getElementById&&!document.all;
if (ie5||ns6){
	var pgEleObj6;
}
//@_FUNCTION BIND LAYER OBJECT TO VARIABLE]
function initPgEleObj(){
 pgEleObj6 = document.getElementById("showAll");
}
//@_FUNCTION SHOW LAYER OBJECT]
function showPgEleObj(){
 pgEleObj6.style.visibility="visible";	
}
//@_FUNCTION HIDE LAYER OBJECT]
function hidPgEleObj(){
 pgEleObj6.style.visibility="hidden";
}
//@_VARIABLE CAN BE USED FOR NAVIGATION
var navByURL = "url";
//@_FUNCTION TO DO NAVIGATION; CALLED BY NAVBAR AND BODY HTMLS
function navDo(how, where){
 if (how == navByURL){ top.mainFrame.location = where; } else {
 alert("Alert Webmaster: Unknown argument 'how' passed to navDo(); how='" + how + "'; where = '" + where + "'");
  } return false;
}
//@_FUNCTION TO IDENTIFIE BROWSER OF USER
function setBrowser(){
 if (setBrowser.firstTime){ setBrowser.firstTime = false;
 if (parseInt(navigator.appVersion) >= 4){
 if (navigator.appName == "Netscape"){ isNav = true; } else { isIE = true; }
		}
	}
}

   var isNav;
   var isIE;
   setBrowser.firstTime = true;
   
//@_FUNCTION TRAP KEY PRESS AND RETURN VALUE TO ME
function returnKeyPressed(e) {
 var rtnKeyCode = 13;
 var key, ev;
 setBrowser();
if (isIE){ ev = window.event; key = ev.keyCode;
	} else if (isNav) { key = e.which; }
if ((key != null) && (key == rtnKeyCode)){ return true; } else { return false; }
}
//@_FUNCTION remove lead zero from date string
function stripLeadZero(str){
   if (str.length < 2){ return str; }
   var i = 0;
     while ((i < (str.length - 1)) && str.charAt(i) == '0'){ i++; }
	return (str.substring(i, str.length));
}
//@_FUNCTION CHECK FOR BLANK FIELDS
function isBlank(str){
    for (var i = 0; i < str.length; i++){
	 var c = str.charAt(i);
     if ((c != ' ') && (c != '\n') && (c != '\t') && (c != '\r')){ return false; }
	} return true;
}
//@_FUNCTION CHECK FOR EMPTY STRING
function isEmpty(str){
	return ((str == null) || (isBlank(str)));
}


