/*
FILE: 'jquery.pgfunctions.js' (DA830_1002_2011)
------------------------------------------------------
WEBSITE COPYRIGHT, IPR, & OWNERSHIP NOTICES
Official Domain: http://www.davesauto830.com
*Admin & Update: December 14, 2011*
------------------------------------------------------
(1) Website Design & Original Working Code:
    Title:  Dave's Auto Repair Offical 2011 Website
      IPR:  Dave's Auto Repair (IPR Owenership)
            Copyright (c) 2008, Copyright (c) 2009, 
            Copryight (c) 2010, Copryight (c) 2011
------------------------------------------------------		 
(2) Design, Development & Production Work:
    Firm: DreamFoxx Marketing & Production Co.
          http://www.dreamfoxx.com
     For: Dave's Auto Repair (www.davesauto830.com
------------------------------------------------------								  
(3) Third party code contributions
	Source: [reference individual script sources below]
		  
**************************************************************************************/


// [01] // dynamic user initiated 'show div/hide div' scripting ===========================================================
// [Begin] global 'show/hide' content scripting
function hideDiv(pass) { 
var divs = document.getElementsByTagName('div'); 
for(i=0;i<divs.length;i++){ 
if(divs[i].id.match(pass)){//if they are 'see' divs 
if (document.getElementById) // DOM3 = IE5, NS6 
divs[i].style.visibility="hidden";// show/hide 
else 
if (document.layers) // Netscape 4 
document.layers[divs[i]].display = 'hidden'; 
else // IE 4 
document.all.hideShow.divs[i].visibility = 'hidden'; 
} 
} 
}

function showDiv(pass) { 
var divs = document.getElementsByTagName('div'); 
for(i=0;i<divs.length;i++){ 
if(divs[i].id.match(pass)){ 
if (document.getElementById) 
divs[i].style.visibility="visible"; 
else 
if (document.layers) // Netscape 4 
document.layers[divs[i]].display = 'visible'; 
else // IE 4 
document.all.hideShow.divs[i].visibility = 'visible'; 
} 
} 
}  
// [Close] global 'show/hide' content scripting =============================================================================
// 'show/hide' content credit source: created by http://http://www.webmasterworld.com/forum91/441.htm */


// [02] // dynamic 'display date and time' scripting  =============================================================================
// ** The following script provides the current date and time to be displayed (via users local machine) **
// [Begin] display 'user's set date and time' scripting 
var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;
ishome=1;
dirM="http://www.BeckleyEmpire.com";
d = new Array(
"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"
);
m = new Array(
"January","February","March","April","May","June","July","August","September","October","November","December"
);
today = new Date();
day = today.getDate();
year = today.getYear();
if (year < 2000)
year = year + 1900;
// [Close] display 'user's set date and time' scripting =============================================================================
// 'display user's set date and time' script credit source: created by http://http://www.webmasterworld.com/forum91/441.htm */


// [03] // "Print", "Bookmark", & "Share" page operators ========================================================================
// [Begin] global 'Page Options' scripting

// bookmark current page function: "bookmark() 
function bookmarkPage(url,title) {
	if (!url) {url = window.location}
	if (!title) {title = document.title}
	var browser=navigator.userAgent.toLowerCase();
	if (window.sidebar) { // Mozilla, Firefox, Netscape
		window.sidebar.addPanel(title, url,"");
	} else if( window.external) { // IE or chrome
		if (browser.indexOf('chrome')==-1){ // ie
			window.external.AddFavorite( url, title); 
		} else { // chrome
			alert('Please Press CTRL+D (or Command+D for macs) to bookmark this page');
		}
	}
	else if(window.opera && window.print) { // Opera - automatically adds to sidebar if rel=sidebar in the tag
		return true;
	}
	else if (browser.indexOf('konqueror')!=-1) { // Konqueror
		alert('Please press CTRL+B to bookmark this page.');
	}
	else if (browser.indexOf('webkit')!=-1){ // safari
		alert('Please press CTRL+B (or Command+D for macs) to bookmark this page.');
	} else {
		alert('Your browser cannot add bookmarks using this link. Please add this link manually.')
	}
}
// [Close] global 'page options' scripting // ===================================================================================================
// bookmark code credit source: created by http://www.mykeblack.com/scripts/javascript/bookmarks/add-to-favorites-bookmark-page-script 


