var overview = '';
var detail = '';
var technical = '';

var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
var tempX = 0
var tempY = 0
function getMouseXY(e)
  {
    if (IE)
      { 
        tempX = event.clientX + document.body.scrollLeft
        tempY = event.clientY + document.body.scrollTop
      }
    else
      {  
        tempX = e.pageX
        tempY = e.pageY
      }    
    if (tempX < 0){tempX = 0}
    if (tempY < 0){tempY = 0}             
    return true        
  }
	
function serviceOver(e)
	{
		e.className = e.className + "Over";
		showHover(e.id + "_hover");
	}
	
function serviceOut(e)
	{
		e.className = e.className.replace('Over','');
		hideHover();			
	}
	
function showHover(theHover)
	{
		s = eval(theHover);	
		var w = 300;
		if(s.length>200){w=500;}
		document.getElementById("hoverCont").innerHTML = s;
		document.getElementById("hover").style.width = w;
		document.getElementById("hover").style.display = "block";
		document.getElementById("hover").style.position = "absolute";
		document.getElementById("hover").style.zorder = 50000;
		document.getElementById("hover").style.top = tempY + 10;
		document.getElementById("hover").style.left = tempX + 10;
	}
	
function hideHover()
	{
		document.getElementById("hover").style.display = "none";
	}
	
function serviceClick(e)
	{
		var pre = ''
		if(document.URL.substring(document.URL.length - 1)=='/')
			{
				pre = '../';
			}
		if(document.URL.indexOf('Details')>0)
			{
				pre = pre + '../';
			}
		if(document.URL.indexOf('Technical')>0)
			{
				pre = pre + '../';
			}
		switch (e.id)
			{
				case 'gts':					
					window.location = pre + "GeneralTechSupport";
					break;
				case 'ts':					
					window.location = pre + "TechnologySolutions";
					break;
				case 'itc':					
					window.location = pre + "ITConsulting";
					break;
				case 'sp':					
					window.location = pre + "SecurityandProtection";
					break;
				case 'ee':					
					window.location = pre + "E-mailen-cryption";
					break;
				case 'em':					
					window.location = pre + "en-mirror";
					break;
				case 'er':					
					window.location = pre + "en-reach";
					break;
			}	
	}
	
function serviceHeaderClick(e)
	{
		var s = document.URL;
		s = s.replace('Details/','');
		s = s.replace('Technical/','');
		switch (e.innerHTML)
			{
				case 'Executive Overview':
					window.location = s;
					break;
				case 'Detail Overview':
					window.location = s + 'Details/';
					break;
				case 'Technical Specifications':
					window.location = s + 'Technical/';
					break;
			}
	}

function checkURL()
	{
		var s = document.URL;		
		if(s.indexOf('services.html')>0)
			{
				document.getElementById("MainServices").style.display = 'block';
			}
		else
			{
				var service = s.replace('/Details/','').replace('/Technical/','');
				service = service.substring(service.substring(0, service.length - 1).lastIndexOf('/')).replace("/","").replace("/","");
				var level = s.substring(s.substring(0, s.length - 1).lastIndexOf('/')).replace("/","").replace("/","");		
				
				switch (service.toLowerCase())
					{
						case 'generaltechsupport':
							overview = gts_overview;	
							detail = gts_detail;
							technical = gts_technical;	
							document.getElementById("gts").className = "serviceListSelected";
							break;
						case 'technologysolutions':
							overview = ts_overview;	
							detail = ts_detail;
							technical = ts_technical;	
							document.getElementById("ts").className = "serviceListSelected";
							break;
						case 'itconsulting':
							overview = itc_overview;	
							detail = itc_detail;
							technical = itc_technical;		
							document.getElementById("itc").className = "serviceListSelected";
							break;
						case 'securityandprotection':
							overview = sp_overview;	
							detail = sp_detail;
							technical = sp_technical;	
							document.getElementById("sp").className = "serviceListSelected";
							break;
						case 'e-mailen-cryption':
							overview = ee_overview;	
							detail = ee_detail;
							technical = ee_technical;		
							document.getElementById("ee").className = "serviceListSelected";
							break;
						case 'en-mirror':
							overview = em_overview;	
							detail = em_detail;
							technical = em_technical;		
							document.getElementById("em").className = "serviceListSelected";
							break;
						case 'en-reach':
							overview = er_overview;		
							detail = er_detail;
							technical = er_technical;	
							document.getElementById("er").className = "serviceListSelected";
							break;
					}
				switch (level.toLowerCase())
					{
						case 'details':
							document.getElementById("OverviewCont").style.display = 'none';
							document.getElementById("DetailCont").style.display = 'block';	
							document.getElementById("TechnicalCont").style.display = 'none';	
							document.getElementById("DetailCont").innerHTML = detail;
							break;
						case 'technical':
							document.getElementById("OverviewCont").style.display = 'none';
							document.getElementById("DetailCont").style.display = 'none';	
							document.getElementById("TechnicalCont").style.display = 'block';
							document.getElementById("TechnicalCont").innerHTML = technical;
							break;
						default:
							document.getElementById("OverviewCont").style.display = 'block';
							document.getElementById("DetailCont").style.display = 'none';	
							document.getElementById("TechnicalCont").style.display = 'none';
							document.getElementById("OverviewCont").innerHTML = overview;							
							break;
					}				
				if(detail.length==0){document.getElementById("Detail").style.display = 'none';}
				if(technical.length==0){document.getElementById("Technical").style.display = 'none';}
				document.getElementById("SpecificService").style.display = 'block';	
				document.getElementById("PrintLink").style.display = 'block';	
				
			}
	}

function openPrint()
	{
		var s = document.URL;			
		var service = s.replace('/Details/','').replace('/Technical/','');
		service = service.substring(service.substring(0, service.length - 1).lastIndexOf('/')).replace("/","").replace("/","");
		var level = s.substring(s.substring(0, s.length - 1).lastIndexOf('/')).replace("/","").replace("/","");		
		var pId = '';
		switch (service.toLowerCase())
			{
				case 'generaltechsupport':
					pId = 'gts_';	
					break;
				case 'technologysolutions':
					pId = 'ts_';
					break;
				case 'itconsulting':
					pId = 'itc_';		
					break;
				case 'securityandprotection':
					pId = 'sp_';	
					break;
				case 'e-mailen-cryption':
					pId = 'ee_';	
					break;
				case 'en-mirror':
					pId = 'em_';					
					break;
				case 'en-reach':
					pId = 'er_';			
					break;
			}
		switch (level.toLowerCase())
			{
				case 'details':
					pId = pId + 'detail'
					break;
				case 'technical':
					pId = pId + 'technical'	
					break;
				default:
					pId = pId + 'overview'							
					break;
			}	
		var pre = ''
		if(document.URL.substring(document.URL.length - 1)=='/')
			{
				pre = '../';
			}
		if(document.URL.indexOf('Details')>0)
			{
				pre = pre + '../';
			}
		if(document.URL.indexOf('Technical')>0)
			{
				pre = pre + '../';
			}
		window.open(pre + 'print.html?id=' + pId);		
	}