
// <!-- this javascript is use for the online store ONLY

{
// green navigation
button1 = new Image;
button1.src = "http://www.vertabase.com/images/onlinestore/main_store.gif";

button2 = new Image;
button2.src = "http://www.vertabase.com/images/onlinestore/check_order.gif";

button3 = new Image;
button3.src = "http://www.vertabase.com/images/onlinestore/edit_profile.gif";

button4 = new Image;
button4.src = "http://www.vertabase.com/images/onlinestore/contact.gif";

button5 = new Image;
button5.src = "http://www.vertabase.com/images/onlinestore/view_cart.gif";
// end of green navigation

// green navigation rollover
button1on = new Image;
button1on.src = "http://www.vertabase.com/images/onlinestore/main_store_roll.gif";

button2on = new Image;
button2on.src = "http://www.vertabase.com/images/onlinestore/check_order_roll.gif";

button3on = new Image;
button3on.src = "http://www.vertabase.com/images/onlinestore/edit_profile_roll.gif";

button4on = new Image;
button4on.src = "http://www.vertabase.com/images/onlinestore/contact_roll.gif";

button5on = new Image;
button5on.src = "http://www.vertabase.com/images/onlinestore/view_cart_roll.gif";
// end of green navigation rollover


}
function imageChange(imageID,imageName,imageID2,imageName2) { 

{
document.images[imageID].src = eval(imageName + ".src");
}

}

// openit function
function openit(sURL,scrolls,w,h,name){
	var sNewURL;
	sNewURL = sURL + "?id=" + Math.random();
	newwindow=open(sNewURL,name,"scrollbars=" + scrolls +",toolbar=no,directories=no,menubar=no,resizable=no,status=yes,width=" + w + ",height=" + h);
	newwindow.focus();
	}
	function blevy(){
	  var asdfadsg = 'con' + 'tact'; asdfadsg += '@'; asdfadsg += 'ver' + 'ta' + 'base.c' + 'om';
	  document.write( '<A HREF="mai' + 'lt' + 'o:' + asdfadsg + '?subject=Vertabase Ecommerce Question"'); 
	  document.write( '">' + asdfadsg + '</A>' );
	}
	function sales(){
	  var asdfadsg = 'sa' + 'les'; asdfadsg += '@'; asdfadsg += 'ver' + 'ta' + 'base.c' + 'om';
	  document.write( '<A HREF="mai' + 'lt' + 'o:'); 
	  document.write( '">' + asdfadsg + '</A>' );
	}


// print function
	var gAutoPrint = true; // Tells whether to automatically call the print function
	
	function printSpecial()
	{
	if (document.getElementById != null)
	{
	var html = '<HTML>\n<HEAD>\n';
	
	if (document.getElementsByTagName != null)
	{
	var headTags = document.getElementsByTagName("head");
	if (headTags.length > 0)
	html += headTags[0].innerHTML;
	}
	
	html += '\n</HE>\n<BODY>\n';
	
	var printReadyElem = document.getElementById("printReady");
	
	if (printReadyElem != null)
	{
	html += printReadyElem.innerHTML;
	}
	else
	{
	alert("Could not find the printReady function");
	return;
	}
	
	html += '\n</BO>\n</HT>';
	
	var printWin = window.open("","printSpecial");
	printWin.document.open();
	printWin.document.write(html);
	printWin.document.close();
	if (gAutoPrint)
	printWin.print();
	}
	else
	{
	alert("The print ready feature is only available if you are using an up to date browser. Please update your browswer.");
	}
	}


// form function for customer support form
function isEmpty(str) {
	return (str.replace(/^[\s]+/g, "") == "");
	}
		
    function validate() {
        var error_msg = '';
		
        if (isEmpty(document.data.Name.value)) {
            error_msg = error_msg + '- Please enter your Name.\n';
        }
		
		 if (isEmpty(document.data.Company.value)) {
            error_msg = error_msg + '- Please enter your Company.\n';
        }
	
		
        if (isEmpty(document.data.Email.value)) {
            error_msg = error_msg + '- Please enter an Email Address. Email Addresses must have the format: email@domain.com.\n';
        } else if (document.data.Email.value.search(/^[\w-_,;:\.']+@[\w-_,;:\.']+\.[a-z]{2,3}$/) == -1) {
            error_msg = error_msg + '- Please enter a valid Email Address. Email Addresses must have the format: email@domain.com.\n';
        }

        if (error_msg != '') { 
            alert("Missing field(s):\n" + error_msg);
            return false; 
        }
	}
	
	function NoneWithCheck(ss) {
        for(var i = 0; i < ss.length; i++) {
      	  if(ss[i].checked) { return false; }
  	    }
        return true;
      }
	  
	function KeyPress()
	{
	//alert(window.event.keyCode)
	if (window.event.keyCode == 13)
	window.event.keyCode =0;
	}
// -->
