// JavaScript Document
<!--
	 // left nav colapsible tabs
	 // sectionName = main name of section (should be first word of the tab header ID's as well)
	 // sectionSpeed = the speed of the animation (should be a fast open and a slightly slower close)
	function toggleLeftNav(sectionName, sectionSpeed) {
		// open section
		if (document.getElementById(sectionName).style.display != 'none') {
			// hide standard button - show alt button - slide open section (down)
			document.getElementById(sectionName + '-cat-2').style.display = 'none';
			document.getElementById(sectionName + '-cat-1').style.display = 'block';
			document.getElementById(sectionName).style.display = 'none';
			// close section
			} else {
			// hide alt button - show standard button - slide close section (up)
			document.getElementById(sectionName + '-cat-1').style.display = 'none';
			document.getElementById(sectionName + '-cat-2').style.display = 'block';
			document.getElementById(sectionName).style.display = 'block';
			}
		}	
		
		function toggleTabs(panel) {
    document.getElementById('communitiesTab').className = 'tmc-com-tb-off';
    document.getElementById('communities2Tab').className = 'tmc-com-tb-off-pub-tb-off';
    document.getElementById('publicationsTab').className = 'tmc-pub-tb-off';
    document.getElementById('publications2Tab').className = 'tmc-pub-tb-off-ind-tb-off';
    document.getElementById('industriesTab').className = 'tmc-ind-tb-off';
    document.getElementById('industries2Tab').className = 'tmc-ind-tb-off-vert-tb-off';
    document.getElementById('verticalsTab').className = 'tmc-vert-tb-off';
    document.getElementById('verticals2Tab').className = 'tmc-vert-tb-off-blnk';

    document.getElementById('communities-top').style.display = "none";
    document.getElementById('publications-top').style.display = "none";
    document.getElementById('industries-top').style.display = "none";
    document.getElementById('verticals-top').style.display = "none";

    switch (panel) {
        case 'communities':
            document.getElementById('communities-top').style.display = "block";
            document.getElementById('communitiesTab').className = 'tmc-com-tb-on';
            document.getElementById('communities2Tab').className = 'tmc-com-tb-on-pub-tb-off';
            break;
        case 'publications':
            document.getElementById('publications-top').style.display = "block";
            document.getElementById('publicationsTab').className = 'tmc-pub-tb-on';
            document.getElementById('communities2Tab').className = 'tmc-com-tb-off-pub-tb-on';
            document.getElementById('publications2Tab').className = 'tmc-pub-tb-on-ind-tb-off'; 
            break;
        case 'industries':
            document.getElementById('industries-top').style.display = "block";
            document.getElementById('industriesTab').className = 'tmc-ind-tb-on';
            document.getElementById('publications2Tab').className = 'tmc-pub-tb-off-ind-tb-on';
            document.getElementById('industries2Tab').className = 'tmc-ind-tb-on-vert-tb-off';
            break;
        case 'verticals':
            document.getElementById('verticals-top').style.display = "block";
            document.getElementById('verticalsTab').className = 'tmc-vert-tb-on';
            document.getElementById('industries2Tab').className = 'tmc-ind-tb-off-vert-tb-on';
            document.getElementById('verticals2Tab').className = 'tmc-vert-tb-on-blnk';
            break;
    }
}

function toggleSecondBox(panel) {

    document.getElementById('Voip1Link').className = 'bx-tab-off-lft';
    document.getElementById('VoipLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('Voip2Link').className = 'bx-tab-off-rt';
    document.getElementById('CRM1Link').className = 'bx-tab-off-lft';
    document.getElementById('CRMLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('CRM2Link').className = 'bx-tab-off-rt';
    document.getElementById('IMS1Link').className = 'bx-tab-off-lft';
    document.getElementById('IMSLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('IMS2Link').className = 'bx-tab-off-rt';
   // document.getElementById('SIP1Link').className = 'bx-tab-off-lft';
   // document.getElementById('SIPLink').className = 'hmpg-tab-lnk-off';
   // document.getElementById('SIP2Link').className = 'bx-tab-off-rt';
    document.getElementById('CallCenter1Link').className = 'bx-tab-off-lft';
    document.getElementById('CallCenterLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('CallCenter2Link').className = 'bx-tab-off-rt';
	document.getElementById('Wireless1Link').className = 'bx-tab-off-lft';
    document.getElementById('WirelessLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('Wireless2Link').className = 'bx-tab-off-rt';
    document.getElementById('SP1Link').className = 'bx-tab-off-lft';
    document.getElementById('SPLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('SP2Link').className = 'bx-tab-off-rt';
   

    document.getElementById('Voip').style.display = "none";
    document.getElementById('CRM').style.display = "none";
   // document.getElementById('SIP').style.display = "none";
    document.getElementById('IMS').style.display = "none";
    document.getElementById('CallCenter').style.display = "none";
	document.getElementById('Wireless').style.display = "none";
	document.getElementById('SP').style.display = "none";

    switch (panel) {
        case 'Voip':
            document.getElementById('Voip').style.display = "block";
            document.getElementById('Voip1Link').className = 'bx-tab-on-lft';
            document.getElementById('VoipLink').className = 'bx-tab-on-mid';
            document.getElementById('Voip2Link').className = 'bx-tab-on-rt';
            break;
        case 'CRM':
            document.getElementById('CRM').style.display = "block";
            document.getElementById('CRM1Link').className = 'bx-tab-on-lft';
            document.getElementById('CRMLink').className = 'bx-tab-on-mid';
            document.getElementById('CRM2Link').className = 'bx-tab-on-rt';
            break;
        case 'IMS':
            document.getElementById('IMS').style.display = "block";
            document.getElementById('IMS1Link').className = 'bx-tab-on-lft';
            document.getElementById('IMSLink').className = 'bx-tab-on-mid';
            document.getElementById('IMS2Link').className = 'bx-tab-on-rt';
            break;
     //   case 'SIP':
     //       document.getElementById('SIP').style.display = "block";
     //       document.getElementById('SIP1Link').className = 'bx-tab-on-lft';
      //      document.getElementById('SIPLink').className = 'bx-tab-on-mid';
      //      document.getElementById('SIP2Link').className = 'bx-tab-on-rt';
      //      break;
        case 'CallCenter':
            document.getElementById('CallCenter').style.display = "block";
            document.getElementById('CallCenter1Link').className = 'bx-tab-on-lft';
            document.getElementById('CallCenterLink').className = 'bx-tab-on-mid';
            document.getElementById('CallCenter2Link').className = 'bx-tab-on-rt';
            break;
		case 'Wireless':
            document.getElementById('Wireless').style.display = "block";
            document.getElementById('Wireless1Link').className = 'bx-tab-on-lft';
            document.getElementById('WirelessLink').className = 'bx-tab-on-mid';
            document.getElementById('Wireless2Link').className = 'bx-tab-on-rt';
            break;	
        case 'SP':
            document.getElementById('SP').style.display = "block";
            document.getElementById('SP1Link').className = 'bx-tab-on-lft';
            document.getElementById('SPLink').className = 'bx-tab-on-mid';
            document.getElementById('SP2Link').className = 'bx-tab-on-rt';
            break;	
			
    }
}

function toggleResourcesBox(panel) {

    document.getElementById('WP1Link').className = 'bx-tab-off-lft';
    document.getElementById('WPLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('WP2Link').className = 'bx-tab-off-rt';
    document.getElementById('POD1Link').className = 'bx-tab-off-lft';
    document.getElementById('PODLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('POD2Link').className = 'bx-tab-off-rt';
    document.getElementById('WEB1Link').className = 'bx-tab-off-lft';
    document.getElementById('WEBLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('WEB2Link').className = 'bx-tab-off-rt';
   

    document.getElementById('WP').style.display = "none";
    document.getElementById('POD').style.display = "none";
    document.getElementById('WEB').style.display = "none";

    switch (panel) {
        case 'WP':
            document.getElementById('WP').style.display = "block";
            document.getElementById('WP1Link').className = 'bx-tab-on-lft';
            document.getElementById('WPLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('WP2Link').className = 'bx-tab-on-rt';
            break;
        case 'POD':
            document.getElementById('POD').style.display = "block";
            document.getElementById('POD1Link').className = 'bx-tab-on-lft';
            document.getElementById('PODLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('POD2Link').className = 'bx-tab-on-rt';
            break;
        case 'WEB':
            document.getElementById('WEB').style.display = "block";
            document.getElementById('WEB1Link').className = 'bx-tab-on-lft';
            document.getElementById('WEBLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('WEB2Link').className = 'bx-tab-on-rt';
            break;
    }
}





function togglePublicationsBox(panel) {

    document.getElementById('ITMAG1Link').className = 'bx-tab-off-lft';
    document.getElementById('ITMAGLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('ITMAG2Link').className = 'bx-tab-off-rt';
    document.getElementById('UCMAG1Link').className = 'bx-tab-off-lft';
    document.getElementById('UCMAGLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('UCMAG2Link').className = 'bx-tab-off-rt';
	document.getElementById('CSMAG1Link').className = 'bx-tab-off-lft';
    document.getElementById('CSMAGLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('CSMAG2Link').className = 'bx-tab-off-rt';
    document.getElementById('NGNMAG1Link').className = 'bx-tab-off-lft';
    document.getElementById('NGNMAGLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('NGNMAG2Link').className = 'bx-tab-off-rt';
   

    document.getElementById('ITMAG').style.display = "none";
    document.getElementById('UCMAG').style.display = "none";
	document.getElementById('CSMAG').style.display = "none";
	document.getElementById('NGNMAG').style.display = "none";

    switch (panel) {
        case 'ITMAG':
            document.getElementById('ITMAG').style.display = "block";
            document.getElementById('ITMAG1Link').className = 'bx-tab-on-lft';
            document.getElementById('ITMAGLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('ITMAG2Link').className = 'bx-tab-on-rt';
            break;
        case 'UCMAG':
            document.getElementById('UCMAG').style.display = "block";
            document.getElementById('UCMAG1Link').className = 'bx-tab-on-lft';
            document.getElementById('UCMAGLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('UCMAG2Link').className = 'bx-tab-on-rt';
            break;
		case 'CSMAG':
            document.getElementById('CSMAG').style.display = "block";
            document.getElementById('CSMAG1Link').className = 'bx-tab-on-lft';
            document.getElementById('CSMAGLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('CSMAG2Link').className = 'bx-tab-on-rt';
            break;
		case 'NGNMAG':
            document.getElementById('NGNMAG').style.display = "block";
            document.getElementById('NGNMAG1Link').className = 'bx-tab-on-lft';
            document.getElementById('NGNMAGLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('NGNMAG2Link').className = 'bx-tab-on-rt';
            break;
    }
}

function toggleEventsBox(panel) {

    document.getElementById('ITEXPO1Link').className = 'bx-tab-off-lft';
    document.getElementById('ITEXPOLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('ITEXPO2Link').className = 'bx-tab-off-rt';
    document.getElementById('CALL1Link').className = 'bx-tab-off-lft';
    document.getElementById('CALLLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('CALL2Link').className = 'bx-tab-off-rt';
	document.getElementById('AST1Link').className = 'bx-tab-off-lft';
    document.getElementById('ASTLink').className = 'hmpg-tab-lnk-off';
    document.getElementById('AST2Link').className = 'bx-tab-off-rt';
  

    document.getElementById('ITEXPO').style.display = "none";
    document.getElementById('CALL').style.display = "none";
	document.getElementById('AST').style.display = "none";


    switch (panel) {
        case 'ITEXPO':
            document.getElementById('ITEXPO').style.display = "block";
            document.getElementById('ITEXPO1Link').className = 'bx-tab-on-lft';
            document.getElementById('ITEXPOLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('ITEXPO2Link').className = 'bx-tab-on-rt';
            break;
        case 'CALL':
            document.getElementById('CALL').style.display = "block";
            document.getElementById('CALL1Link').className = 'bx-tab-on-lft';
            document.getElementById('CALLLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('CALL2Link').className = 'bx-tab-on-rt';
            break;
        case 'AST':
            document.getElementById('AST').style.display = "block";
            document.getElementById('AST1Link').className = 'bx-tab-on-lft';
            document.getElementById('ASTLink').className = 'bx-tab-on-mid-bl';
            document.getElementById('AST2Link').className = 'bx-tab-on-rt';
            break;
    }
}

function showDiv(obj, text) {
    document.getElementById('divArticlePreview').innerHTML = text;
    document.getElementById('divArticlePreview').style.left = findPos(obj)[0] + 'px';
    document.getElementById('divArticlePreview').style.top = findPos(obj)[1] + 'px';

   document.getElementById('divArticlePreview').style.display = '';
}

function findPos(obj) {
    var posX = obj.offsetLeft; var posY = obj.offsetTop;
    while (obj.offsetParent) {
        if (obj == document.getElementsByTagName('body')[0]) { break }
        else {
            posX = posX + obj.offsetParent.offsetLeft;
            posY = posY + obj.offsetParent.offsetTop;
            obj = obj.offsetParent;
        }
    }
    var posArray = [posX, posY + 20]
    return posArray;
}


//--> 

