﻿// JScript File
 	function popMixProducts(){
		window.open('http://www.mixtelematics.com/microsites/FMProducts/FMProducts.html','popUp','scrollbars=yes,width=1000,height=640, left=175, top=50');
	}
	
	function popMixServices(){
		window.open('Presentations/FMServices/FMServices.html','popUp','scrollbars=yes,width=1000,height=640, left=175, top=50');
	}
	
function JumpMenu(targ,selObj,restore){ //v3.0

    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) 
        selObj.selectedIndex=0;

}

function ReSize()
{

    if (self.innerWidth)
    {
	    frameHeight = self.innerHeight;

	    if (document.body.offsetHeight < frameHeight)
	    {
	        
	        document.getElementById('footer').style.height = "80px";
	        document.getElementById('footer').style.bottom = "0";
	        document.getElementById('footer').style.position = "absolute";
	    }
    }
    else if (document.documentElement && document.documentElement.clientWidth)
    {
	    frameWidth = document.documentElement.clientWidth;
	    frameHeight = document.documentElement.clientHeight;
	    document.getElementById('tblText').style.height = frameHeight - 86; //height of copyright statement;
	    document.getElementById('tblContent').style.height = "";
    }
    else if (document.body)
    {
	    frameWidth = document.body.clientWidth;
	    frameHeight = document.body.clientHeight;
	    document.getElementById('tblText').style.height = frameHeight - 86; //height of copyright statement;
    }
}


function OpenWindow(url, popname, args)
{
var mine = window.open(url,popname,args);
 if(mine)
    var popUpsBlocked = false
 else
    var popUpsBlocked = true

if(popUpsBlocked)
  alert('You are using popup blocker software. This website needs to open a window... please disable your popup blocker.');

}

function ValidateCountry(element, value)
{
    var ddlCountry;
    ddlCountry = document.getElementById("ctl00_Content_Center_ddlCountry");
    
    if (ddlCountry)
    {
         if (ddlCountry.value == "")
           value.IsValid = false;
    }
    else
    {
        ddlCountry = document.getElementById("ddlCountry");
         if (ddlCountry.value == "")
           value.IsValid = false;        
    }
}


function SubmitSearch(myfield)
{
var keycode;
if (window.event) keycode = window.event.keyCode;

if (keycode == 13)
   {
   //document.getElementById(myfield).click();
   __doPostBack(document.getElementById(myfield),'');
   return false;
   }
}
function RedirectSearch()
{
	window.location = "search.aspx?search=" + document.getElementById("Header1_txtSearch").value;

}
