﻿if(!document.all && navigator.appVersion >= "5"){
var layerRef="document.getElementById";
var styleSwitch=".style";

function showLayer(layerName){
eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="visible"');
}	
function hideLayer(layerName){
eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="hidden"');
}
function moveLayerup(layerName){
eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top="-41px"');
}	
function moveLayerdown(layerName){
eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top="0px"');
}	
}
else if (document.layers){
var layerRef="document.layers";
var styleSwitch="";

function showLayer(layerName){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}	
function hideLayer(layerName){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
}
function moveLayerup(layerName){
eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top="-41px"');
}	
function moveLayerdown(layerName){
eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top="0px"');
}	
}
else if (document.all){
var layerRef="document.all";
var styleSwitch=".style";

function showLayer(layerName){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}	
function hideLayer(layerName){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
}
function moveLayerup(layerName){
eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top="-41px"');
}	
function moveLayerdown(layerName){
eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top="0px"');
}	
}


//Main Navigation Rollovers

block101= new Image();
block102= new Image();
block103= new Image();
block104= new Image();
block105= new Image();
block106= new Image();
block107= new Image();
block108= new Image();
block109= new Image();
block110= new Image();
block111= new Image();
block112= new Image();
block119= new Image();
block120= new Image();
block121= new Image();
block122= new Image();
block123= new Image();
block124= new Image();
block125= new Image();
block126= new Image();
block127= new Image();
block128= new Image();
block129= new Image();
block130= new Image();
block131= new Image();
block132= new Image();
block133= new Image();
block148= new Image();
block149= new Image();

// Top Navigation images
block134= new Image();
block135= new Image();
block136= new Image();
block137= new Image();
block138= new Image();
block139= new Image();
block140= new Image();
block141= new Image();
block142= new Image();
block143= new Image();
// more left nav
block144= new Image();
block145= new Image();
block146= new Image();
block147= new Image();
block148= new Image();
block149= new Image();


block101.src="img/images/MK_Nav_Newsletters.png";
block102.src="img/images/MK_Nav_Newsletters_on.png";
block103.src="img/images/MK_Nav_banners.png";
block104.src="img/images/MK_Nav_banners_on.png";
block105.src="img/images/MK_Nav_webinars.png";
block106.src="img/images/MK_Nav_webinars_on.png";
block107.src="img/images/MK_Nav_OnSite.png";
block108.src="img/images/MK_Nav_OnSite_on.png";
block109.src="img/images/MK_Nav_Whitepapers.png";
block110.src="img/images/MK_Nav_Whitepapers_on.png";
block111.src="img/images/MK_Nav_AudioVideo.png";
block112.src="img/images/MK_Nav_AudioVideo_on.png";
block121.src="img/images/MK_Nav_Events.png";
block122.src="img/images/MK_Nav_Events_on.png";
block123.src="img/images/MK_Nav_ListRentals.png";
block124.src="img/images/MK_Nav_ListRentals_on.png";
block125.src="img/images/MK_Nav_Reprints.png";
block126.src="img/images/MK_Nav_Reprints_on.png";
block127.src="img/images/MK_Nav_Sales.png";
block128.src="img/images/MK_Nav_Sales_on.png";
block129.src="img/images/MK_Nav_Editorial.png";
block130.src="img/images/MK_Nav_Editorial_on.png";

block144.src="img/images/MK_Nav_Audience.png";
block145.src="img/images/MK_Nav_Audience_on.png";
block146.src="img/images/MK_Nav_InSites.png";
block147.src="img/images/MK_Nav_InSites_on.png";
block148.src="img/images/MK_Nav_Global_Marketing.png";
block149.src="img/images/MK_Nav_Global_Marketing_on.png";



// footer part
block131.src="img/images/MK_Footer_Block5.jpg";
block132.src="img/images/MK_Nav_Bottom.gif";
block133.src="img/images/MK_Footer_Block4.jpg";



function MainNavMenu(num){

if (num=="102"){
 setAll();
 document.Newsletters.src=block102.src;

}else if (num=="104"){
 setAll();
 document.Banners.src=block104.src;
  
}else if (num=="106"){
 setAll();
 document.Webinars.src=block106.src;
 
 }else if (num=="149"){
 setAll();
 document.MarketingSolutions.src=block149.src;
  
}else if (num=="107"){
 setAll();
 document.OnSite.src=block107.src;
   
}else if (num=="108"){
 setAll();
 document.Whitepapers.src=block108.src;
   
 }else if (num=="112"){
 setAll();
 document.AudioVideo.src=block112.src;

 
}else if (num=="122"){
 setAll();
 document.LiveEvents.src=block122.src;
 
}else if (num=="124"){
 setAll();
 document.ListRentals.src=block124.src;
 
}else if (num=="126"){
 setAll();
 document.Reprints.src=block126.src;
 
}else if (num=="128"){
 setAll();
 document.Sales.src=block128.src;
 
}
else if (num=="130"){
 setAll();
 document.Editorial.src=block130.src;
 
}

else if (num=="145"){
 setAll();
 document.Audience.src=block145.src;
 
}
else if (num=="134"){
 setAll();
 document.InSites.src=block147.src;
 
}

else if (num=="199"){
 setHome(); 
}
}

function setAll(){
	document.Newsletters.src=block101.src;
	document.Banners.src=block103.src;
	document.Webinars.src=block105.src;
	document.OnSite.src=block107.src;
	document.Whitepapers.src=block109.src;
	document.AudioVideo.src=block111.src;
	document.LiveEvents.src=block121.src;
	document.ListRentals.src=block123.src;
	document.Reprints.src=block125.src;
	document.Sales.src=block127.src;
	document.Editorial.src=block129.src;
	document.Audience.src=block145.src;
	document.InSites.src=block146.src;
	document.MarketingSolutions.src=block148.src;
	
	//hide the top part of the footer
	frames['footer'].location.href = 'footerPage.htm';
	//ChangeFooter1();
	//addframeheight();
	//document.nav_bottom.src="img/spacer_1by1.gif";
	


}



function setHome(){
	document.Newsletters.src=block101.src;
	document.Banners.src=block103.src;
	document.Webinars.src=block105.src;
	document.OnSite.src=block107.src;
	document.Whitepapers.src=block109.src;
	document.AudioVideo.src=block111.src;
	document.LiveEvents.src=block121.src;
	document.ListRentals.src=block123.src;
	document.Reprints.src=block125.src;
	document.Sales.src=block127.src;
	document.Editorial.src=block129.src;
	document.Audience.src=block145.src;
	document.InSites.src=block146.src;

	
	//hide the top part of the footer
	frames['footer'].location.href = 'footerHome.htm';
	//ChangeFooter2();
	//document.MK_Footer_Block4.src=block133.src;
	//takeframeheight();
	//document.nav_bottom.src="img/spacer_1by1.gif";
	//moveLayerdown('footertable');
	


}

// top navigation

block134.src="img/images/MK_Nav_About_off.jpg";
block135.src="img/images/MK_Nav_About_on.jpg";
block136.src="img/images/MK_Nav_GlobalStaff_off.jpg";
block137.src="img/images/MK_Nav_GlobalStaff_on.jpg";
block138.src="img/images/MK_Nav_Contact_off.jpg";
block139.src="img/images/MK_Nav_Contact_on.jpg";
block140.src="img/images/MK_Nav_Privacy_off.jpg";
block141.src="img/images/MK_Nav_Privacy_on.jpg";
block142.src="img/images/MK_Nav_Help_off.jpg";
block143.src="img/images/MK_Nav_Help_on.jpg";



function topNavMenu(num){

if (num=="202"){
 document.About.src=block135.src;
 //document.GlobalStaff.src=block136.src;
 document.Contact.src=block138.src;
 document.Privacy.src=block140.src;
 //document.Help.src=block142.src;

}else if (num=="204"){
 document.About.src=block134.src;
// document.GlobalStaff.src=block137.src;
 document.Contact.src=block138.src;
 document.Privacy.src=block140.src;
 //document.Help.src=block142.src;
 
}else if (num=="206"){
 document.About.src=block134.src;
 //document.GlobalStaff.src=block136.src;
 document.Contact.src=block139.src;
 document.Privacy.src=block140.src;
 //document.Help.src=block142.src;
 
}else if (num=="208"){
 document.About.src=block134.src;
// document.GlobalStaff.src=block136.src;
 document.Contact.src=block138.src;
 document.Privacy.src=block140.src;
 //document.Help.src=block142.src;
 
}else if (num=="210"){
 document.About.src=block134.src;
 //document.GlobalStaff.src=block136.src;
 document.Contact.src=block138.src;
 document.Privacy.src=block140.src;
// document.Help.src=block143.src;
}
else if (num=="299"){
 document.About.src=block134.src;
 //document.GlobalStaff.src=block136.src;
 document.Contact.src=block138.src;
 document.Privacy.src=block140.src;
 //document.Help.src=block142.src;
}
}






function addframeheight()
{
	var new_height = '431px'
	document.getElementById('inside').height = new_height;
}

function takeframeheight()
{
	var new_height = '346px'
	document.getElementById('inside').height = new_height;
}

function loadPage ( string ){
		if (string == ""){
			frames['inside'].location.href = 'PublisherMessage.htm';
		}
		else {
			if (string == 1){
				frames['inside'].location.href = 'BannerSpecs.htm';
				}
			else if (string == 2){
				frames['inside'].location.href = 'Banners.htm';
				}
			else if (string == 3){
				frames['inside'].location.href = 'Newsletters.htm';
				}
			else if (string == 4){
				frames['inside'].location.href = 'Webinars.htm';
				}
			else if (string == 5){
				frames['inside'].location.href = 'Insites.htm';
				}
			else if (string == 6){
				frames['inside'].location.href = 'Whitepapers.htm';
				}
			else if (string == 7){
				frames['inside'].location.href = 'PrintPlus.htm';
				}
			else if (string == 8){
				frames['inside'].location.href = 'OnSite.htm';
				}
			else if (string == 9){
				frames['inside'].location.href = 'Rates.htm';
				}
		 	else if (string == 10){
				frames['inside'].location.href = 'ListRentals.htm';
				}
			else if (string == 11){
				frames['inside'].location.href = 'About.htm';
				}
			else if (string == 12){
				frames['inside'].location.href = 'PrivacyPolicy.htm';
				}
			else if (string == 13){
				frames['inside'].location.href = '/Registration/Contact.asp';
				}
			else if (string == 14){
				frames['inside'].location.href = 'M2M.htm';
				}
			else if (string == 15){
				frames['inside'].location.href = 'VerticalSystems.htm';
				}
			else if (string == 16){
				frames['inside'].location.href = 'Roundtable.htm';
				}
			else if (string == 17){
				frames['inside'].location.href = '/Registration/Contact.asp?FormType=e&s=Jim%20Barthold&email=jbarthold@telecommagazine.com';
				}
			else if (string == 18){
				frames['inside'].location.href = '/Registration/Contact.asp?FormType=e&s=Sean%20Buckley&email=sbuckley@telecommagazine.com';
				}
			else if (string == ""){
				frames['inside'].location.href = 'Promotion.htm';
				}
			else {
				frames['inside'].location.href = string;
				}
		}
	}



function setActiveStyleSheet(title) {
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title) a.disabled = false;
     }
   }
}



//Editorial Calendar Script
function editCal(num){

if (num=="1"){
hideAll('999');
showLayer('month01');
window.scrollTo(0,0);

}else if (num=="2"){
hideAll('999');
showLayer('month02');
window.scrollTo(0,0);

}else if (num=="3"){
hideAll('999');
showLayer('month03');
window.scrollTo(0,0);

}else if (num=="4"){
hideAll('999');
showLayer('month04');
window.scrollTo(0,0);

}else if (num=="5"){
hideAll('999');
showLayer('month05');

}else if (num=="6"){
hideAll('999');
showLayer('month06');

}else if (num=="7"){
hideAll('999');
showLayer('month07');

}else if (num=="8"){
hideAll('999');
showLayer('month08');

}else if (num=="9"){
hideAll('999');
showLayer('month09');

}else if (num=="10"){
hideAll('999');
showLayer('month10');

}else if (num=="11"){
hideAll('999');
showLayer('month11');

}else if (num=="12"){
hideAll('999');
showLayer('month12');
}
}

function hideAll(num){
	if (num=="999"){
	hideLayer('month01');
	hideLayer('month02');
	hideLayer('month03');
	hideLayer('month04');
	//hideLayer('month05');
	//hideLayer('month06');
	//hideLayer('month07');
	//hideLayer('month08');
	//hideLayer('month09');
	//hideLayer('month10');
	//hideLayer('month11');
	//hideLayer('month12');
	
	}
}

//resize script

function resized(){
  if(pageWidth!=innerWidth || pageHeight!=innerHeight){
    location.reload()
  }
}


if(document.layers){
  pageWidth=innerWidth
  pageHeight=innerHeight
  window.onresize=resized
}



function defocus(x) {

    if (navigator.appName == 'Microsoft Internet Explorer' || document.all)
        x.blur();
}


function popUp(URL) 
				{
				day = new Date();
				id = day.getTime();
				eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=550,height=500,left = 50,top = 20');");
				}

