// Innitialize dropdown menus
function init() {
			if (TransMenu.isSupported()) {
				TransMenu.initialize();

				menu2.onactivate = function() { document.getElementById("bsolutions").className = "thover"; document.bsolutions.src='/siteimages/menu_solutions_on.gif'; };
				menu2.ondeactivate = function() { document.getElementById("bsolutions").className = ""; document.bsolutions.src='/siteimages/menu_solutions.gif'; };

				menu3.onactivate = function() { document.getElementById("bproducts").className = "thover"; document.bproducts.src='/siteimages/menu_products_on.gif'; };
				menu3.ondeactivate = function() { document.getElementById("bproducts").className = ""; document.bproducts.src='/siteimages/menu_products.gif'; };

				menu4.onactivate = function() { document.getElementById("bservices").className = "thover"; document.bservices.src='/siteimages/menu_services_on.gif'; };
				menu4.ondeactivate = function() { document.getElementById("bservices").className = ""; document.bservices.src='/siteimages/menu_services.gif'; };

				menu5.onactivate = function() { document.getElementById("babout").className = "thover"; document.babout.src='/siteimages/menu_about_on.gif'; };
				menu5.ondeactivate = function() { document.getElementById("babout").className = ""; document.babout.src='/siteimages/menu_about.gif'; };
			
				menu6.onactivate = function() { document.getElementById("bsupport").className = "thover"; document.bsupport.src='/siteimages/menu_support_on.gif'; };
				menu6.ondeactivate = function() { document.getElementById("bsupport").className = ""; document.bsupport.src='/siteimages/menu_support.gif'; };

				menu7.onactivate = function() { document.getElementById("bpartners").className = "thover"; document.bpartners.src='/siteimages/menu_partners_on.gif'; };
				menu7.ondeactivate = function() { document.getElementById("bpartners").className = ""; document.bpartners.src='/siteimages/menu_partners.gif'; };

			}
		}
// For misc. rollovers		
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/////////////////////////////////////////////////////////
/// Below are a group of misc. scripts from TippingPoint 
/////////////////////////////////////////////////////////
// Hover script
function initTip(){
	
}

function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr)
subobj.style.display=(subobj.style.display!="block")? "block" : "none"
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0) 
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
subobj.style.left=xpos+"px"
subobj.style.top=ypos+"px"
return false
}
else
return true
}

function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}

// BROWSER WINDOW SCRIPTS

function openWindow(URL) {
newWindow = window.open(URL, width, height, "namethewindow", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left=30,top=30")
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//////////////////////////////

// START PRODUCT PAGE SHOW / HIDE DIVS JAVASCRIPT
function showhide(v_divtoshow, v_divtohide)
	{
	if (document.getElementById)
		{
		obj_divtoshow = document.getElementById(v_divtoshow);
		obj_divtoshow.style.display = "";
		
		obj_divtohide = document.getElementById(v_divtohide);
		obj_divtohide.style.display = "none";

		}
	} 
//////////////////////////////
function checkForm(theform) {
if (validateRegFields(theform)) {
//	theform.retURL.value=location.href;
	theform.Redirect.value=location.href;
	if (dlReq != '') {
		window.open(dlReq,'dlWin');
	}
	sfDone(30,1);
	mtcSubmitForm(theform);
	return true;
} else {
	return false;
}
}

function skipForm() {
	sfDone(15,0);
	sfregwindow.hide();
	parent.loadVid(0);
}

function validateRegFields(theform) {
var forgotfieldmessage = 'The following fields are required:\n';
var fielderror = 0;
//theform.retURL.value=dlReq;
if (theform.FirstName.value.length < 1) {
	forgotfieldmessage += 'First Name\n';
	fielderror = 1;
}
if (theform.LastName.value.length < 1) {
	forgotfieldmessage += 'Last Name\n';
	fielderror = 1;
}
if (theform.Company.value.length < 1) {
	forgotfieldmessage += 'Company\n';
	fielderror = 1;
}
if (theform.EmailAddress.value.length < 1) {
	forgotfieldmessage += 'Email Address\n';
	fielderror = 1;
}
if (theform.Country.value.length < 1) {
	forgotfieldmessage += 'Country\n';
	fielderror = 1;
}

if (fielderror) {
	alert(forgotfieldmessage);
	return false;
} else {
	return true;
}
}
//////////////////////////////

