
// ***** Btn Rollover *****
function roll(imgName,imgState) {
   try{
      document.images[imgName].src = imgState
   }catch( e ){}
}
// ***********************************************************************

// ***** Preload Home Page Rollover Images ***************************************
if (document.images) {

    var imgArray = new Array();
	preloadImage( imgArray, "../images/icons/about-us_hv.jpg" );
	preloadImage( imgArray, "../images/icons/contact-us_hv.jpg" );
	preloadImage( imgArray, "../images/icons/showcase_hv.jpg" );

}

function preloadImage( imageArray, imageSrc ) {
    var img = new Image();
    img.src = imageSrc;
    imageArray[ imageSrc ] = img;
}

//**************************Popup class script ******************************
/// creates a popup 800x600 when a link has class="VT on it"
/// example: <a href="default.aspx" class="popup">Home</a>

window.onload = function() {
	// check to see that the browser supports the getElementsByTagName method
	// if not, exit the loop 
	if (!document.getElementsByTagName) {
	  
		return false; 
	} 
	// create an array of objects of each link in the document 
	var popuplinks = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popuplinks.length; i++) {	
		// if the link has a class of "popup"...	
		if (popuplinks[i].className == "VT") {		
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 
			
			popuplinks[i].onclick = function() {	
			openPopUp(this.getAttribute("href"));	
			return false; 	
			} 	
		}
	} 
} 

function openPopUp(linkURL) {
window.open(linkURL,'VT','location=0,status=0,scrollbars=1,width=750, height=575')
}