// Copyright Acro Media Inc. 1998-2006, www.acromediainc.com

function copyrightYear(){
	if(document.getElementById('insertYear')) document.getElementById('insertYear').innerHTML = new Date().getFullYear();
}


function externalLinks(){
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		if (anchors[i].getAttribute("href") && anchors[i].getAttribute("rel") == "external") anchors[i].target = "_blank";
	}
}



//Checks to see if safari is on, boolean
var detect = navigator.userAgent.toLowerCase();
var safStatus,thestring;
function checkSafari(){	
	if (checkIt('safari')) safStatus = true;
	else safStatus = false;
	function checkIt(string){
		place = detect.indexOf(string) + 1;
		return place;
	}
}


siteOnLoad = function (){
	checkSafari();
	copyrightYear();
	externalLinks();
}

function addLoadEvent(func){
	var oldOnLoad = window.onload;
	if(typeof window.onload != 'function'){ 
		window.onload = func;
	}
	else{ 
		window.onload = function(){ 
			oldOnLoad();
			func();
		}
	}
}


addLoadEvent(siteOnLoad);

// Handle the Login Fields
function showPwd(theField){
  theField.style.display='none';
  pwdField = theField.form.PIN;
  pwdField.style.display='block';
  pwdField.focus();
}
function showNote(theField){
  if(theField.value==""){
    theField.style.display='none';
    noteField = theField.form.pwdNote;
    noteField.style.display='';
  }
}
function showText(theField) {
	if(theField.value==""){
		theField.value = "username";
	}
}

//Testimonials Script

function getTestimonial() {

	var testimonial=new Array();
	testimonial[0] = new Array ("WaveGard is one of the only consulting firms that really helped us address our needs.  Their consultants are all highly competent, experienced, and capable of clearly communicating with our team.  We highly recommend them.", "Patrick McDonald, IT Manager, IOMAI Vaccines");
	testimonial[1] = new Array ("WaveGard provided the hospital with a HIPAA Gap Analysis that not only enabled our team to better protect EPHI data, but also <br />provided a comprehensive roadmap for lowering our areas of risk across the enterprise.  WaveGard was an excellent choice for helping us enhance our security program.", "Mike O'Baugh, Network Security Engineer, Augusta Medical Center");
	testimonial[2] = new Array ("WaveGard's ability to translate complex security concepts into a client specific business risk model has drastically improved our ability to prioritize IT activities and enhance our overall security posture.  WaveGard is a valued and strategic extension to my staff.", "Howard Scott, IT Director, MERS Inc.");
	testimonial[3] = new Array ("WaveGard's staff is superior when it comes to wireless technologies.  You can't go wrong using these guys!", "John Doyle, Network Engineer, AREVA");
	testimonial[4] = new Array ("We really liked the [custom CWSP wireless security] course.  Each of us has areas where we want to improve and I think you hit them all.", "Network Engineer supporting our troops in Iraq, U.S. Army");
	testimonial[5] = new Array ("The general consensus is that CWNA was a great class, everyone learned a lot.  We are really pleased with the training and at the least will be looking to do a CWNA, CWSP every year as we get new Soldiers in.", "Officer supporting our troops in Iraq, U.S. Army");
	testimonial[6] = new Array ("I thought the CWNA wireless class was outstanding!!  Besides a mastery of the subject matter, the WaveGard instructor's teaching style created an excellent learning environment. Without question, they are 'pro level'.", "Kieran Delay, Manager of Information Systems, KS&amp;R, Inc.");
	
	
	var t = testimonial.length;
	var whichTestimonial=Math.round(Math.random()*(t-1));
	
	// If the testimonial is longer than 150 characters, it's going to get trimmed off at the next word.
	/*if (testimonial[whichTestimonial][0].length > 250) {
		for (var x=250; x<350; x++) {
			if (testimonial[whichTestimonial][0].charAt(x) == " ") {
				testimonial[whichTestimonial][0] = testimonial[whichTestimonial][0].substr(0, x) + "...";
				break;
			}
		}
	}*/
	document.write("&ldquo\;" + testimonial[whichTestimonial][0] + "&rdquo\; <br> - <strong>" + testimonial[whichTestimonial][1] + "</strong>");
}

//Testimonials Script

//Service Focus Script

function getServiceFocus() {

	var serviceFocus=new Array();
	serviceFocus[0] = new Array ("<p><strong>INFORMATION WEEK ARTICLE...</strong></p><p>WaveGard's October 6, 2008 article entitled, <strong>Inside Smartphone Security</strong>, is the first in a 'Rolling Review' series to address ways to tackle the risks of exposing sensitive information that lives on Smartphones.</p><p><a href=\"articles.htm\">Read more &gt;</a></p>");
//	serviceFocus[1] = new Array ("<p><strong>WaveGard publishes article in Information Week Magazine!</strong></p><p>Our May, 2008 article entitled, WLANs Branch Out, explains how one unmanaged access point at a remote office can make a huge security mess. The answer? Extend the corporate wireless LAN. We explain how</p><p><a href=\"articles.htm\">Read more &gt;</a></p>");
//	serviceFocus[2] = new Array ("<p>WaveGard announces a new set of low cost <strong>\"Security Quick Check (SQC)\"</strong> programs that provide you with vital information about your system's security.</p><p>An SQC gives you detailed information about the current effectiveness of your in-place security controls at a low price point. Give one a try today!</p><p><a href=\"security_services_arv_sec_quick.htm\">Read more &gt;</a></p>");
//	serviceFocus[3] = new Array ("<p><strong>Are you getting the full benefits of your expensive security gear?</strong></p><p>WaveGard offers a fresh set of eyes and an objective perspective to help ensure your security components are well tuned and delivering what they promise.  Our new Security Device Optimization Service (SDOS), performed by senior-level WaveGard consultants, focuses strictly on security and performance optimization of wireless systems, firewalls, VPNs, IDS/IPS solutions, and routers.</p><p>  <a href=\"contact_us.htm\">Contact WaveGard for more information></a></p>");
//	serviceFocus[4] = new Array ("<p><strong>Confused about what to do about secure wireless networking? Need a solution for both your employees and guests?</strong></p><p>WaveGard has significant expertise and familiarity with many of today's top 802.11 wireless components. We excel at guiding clients through the design of highly secure wireless environments that cleanly mesh with your existing wired systems.  Many of our techniques are part of WaveGard's latest wireless security book, CWSP Certified Wireless Security Professional - Official Study Guide, written by staff members Rick Dreger and Grant Moerschel.</p><p><a href=\"contact_us.htm\">Contact WaveGard for more information></a></p>");
//	serviceFocus[5] = new Array ("<p><strong>What does a hacker see when he eyes your systems?</strong><p>WaveGard's Wireless Attack and Penetration Testing Service provides our clients with a method for evaluating the security of their Internet network perimeter by running real world attacks against your systems like those used by malicious hackers.  Our process involves an active identification and analysis of your systems for any known weaknesses, vulnerabilities or configuration flaws.  Identification and analysis is conducted from the viewpoint of a hacker and with your permission, involves active attempts to exploit system vulnerabilities even if you have a firewall in place.</p><p><a href=\"security_services_arv_att_pen.htm\">Read more &gt;</a></p>");
//	serviceFocus[6] = new Array ("<p><strong>The HIPAA Enterprise Security Assessment (HESA)</strong> utilizes a programmatic approach for evaluating the technical, administrative and management security controls across the IT enterprise and mapping findings to the relevant HIPAA security rule.  This service not only enhances EPHI data protection, but also improves strategic planning using normalized HIPAA compliance parameters.</p><p><a href=\"contact_us.htm\">Contact WaveGard for more information></a></p>");
				
	var t = serviceFocus.length;
	var whichServiceFocus=Math.round(Math.random()*(t-1));
	
	// If the serviceFocus is longer than 150 characters, it's going to get trimmed off at the next word.
	//if (serviceFocus[whichServiceFocus][0].length > 150) {
		//for (var x=150; x<200; x++) {
			//if (serviceFocus[whichServiceFocus][0].charAt(x) == " ") {
				//serviceFocus[whichServiceFocus][0] = serviceFocus[whichServiceFocus][0].substr(0, x) + "...";
				//break;
			//}
		//}
	//}
	document.write(serviceFocus[whichServiceFocus][0]);
}

//Service Focus Script