function switchSubNav(iSubNavId, iTotal)
{
 for (var i = 1; i <= iTotal; i ++)
 {
 var objNav = document.getElementById("LeftSubNav" + i);
 var objLink = document.getElementById("LeftNavLink" + i);

 if (i == iSubNavId)
 {
 if (objNav.style.display == "block")
 {
 objLink.className = "leftNav";
 objNav.style.display = "none";
 }

 else
 {
 objLink.className = "leftNavSelected";
 objNav.style.display = "block";
 }
}

else
 {
 objLink.className = "leftNav";
 objNav.style.display = "none";
 }
 }
}

function cnnPlayVideo(_url) {
	cnnOpen(_url);
}

  function qs_showBlock( )
  	{
  		var objDate = new Date( );
  		var iYear   = objDate.getYear( );

  		if (iYear < 1000)
  			iYear += 1900;

  		var iMonth   = (objDate.getMonth( ) + 1);
  		var iDay     = objDate.getDate( );

  		if (iYear == 2007)
  		{
  			if (iMonth == 11) {
  				if ( iDay <= 4) {
	  				document.getElementById('LeftSubNav2').style.display = "block";
  				} else if (iDay <= 18) {
	  				document.getElementById('LeftSubNav3').style.display = "block";
  				}
  				else {
	  				document.getElementById('LeftSubNav4').style.display = "block";
  				}
  			} else if (iMonth == 10) {
				document.getElementById('LeftSubNav2').style.display = "block";
  			} else {
  			
				// default behaviour  			
  			}

  	}



function qs_addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
      window.onload = func;
    } else {
      window.onload = function() {
        if (oldonload) {
          oldonload();
        }
        func();
      }
    }
  }
  addLoadEvent(qs_showBlock);





// BEGIN PRINTER-FRIENDLY CODE ******************
function printFriendly()
{
	printBanner1 = document.getElementById("printBanner");
	bannerAd1 = document.getElementById("bannerAd");
	bannerAd2 = document.getElementById("adspace-bannerAd");
	header1 = document.getElementById("header");
	pageContent1 = document.getElementById("pageContent");
	colLeft1 = document.getElementById("colLeft");
	colRight1 = document.getElementById("colRight160");
	printTools1 = document.getElementById("printTools");
	printIcon1 = document.getElementById("printIcon");
	footer1 = document.getElementById("footer");

	if (printBanner1) { printBanner1.style.display = "inline"; }
	if (bannerAd1) { bannerAd1.style.display = "none"; }
	if (bannerAd2) { bannerAd2.style.display = "none"; }
	if (header1) { header1.style.display = "none"; }
	if (pageContent1) { pageContent1.style.backgroundImage = "none"; }
	if (colLeft1) { colLeft1.style.display = "none"; }
	if (colRight1) { colRight1.style.display = "none"; }
	// if (printTools1) { printTools1.style.display = "inline"; }
	if (printIcon1) { printIcon1.style.display = "none"; }
	if (footer1) { footer1.style.display = "none"; }
	window.print();
	return;
}
function viewFriendly()
{	
	printBanner1 = document.getElementById("printBanner");
	bannerAd1 = document.getElementById("bannerAd");
	bannerAd2 = document.getElementById("adspace-bannerAd");
	header1 = document.getElementById("header");
	pageContent1 = document.getElementById("pageContent");
	colLeft1 = document.getElementById("colLeft");
	colRight1 = document.getElementById("colRight160");
	printTools1 = document.getElementById("printTools");
	printIcon1 = document.getElementById("printIcon");
	footer1 = document.getElementById("footer");

	if (printBanner1) { printBanner1.style.display = "none"; }
	if (bannerAd1) { bannerAd1.style.display = "inline"; }
	if (bannerAd2) { bannerAd2.style.display = "inline"; }
	if (header1) { header1.style.display = "inline"; }
	if (pageContent1) { pageContent1.style.backgroundImage = "inline"; }
	if (colLeft1) { colLeft1.style.display = "inline"; }
	if (colRight1) { colRight1.style.display= "inline"; }
	if (printIcon1) { printIcon1.style.display = "inline"; }
	if (printPage1) { printPage1.style.display = "none"; }
	if (footer1) { footer1.style.display = "inline"; }
	return;
};
// END PRINTER-FRIENDLY CODE ******************


// BEGIN PHOTO GALLERY POPUP CODE

function gallery_popup(galleryURL) {
	CNN_openPopup(galleryURL, 'gallery_popup', 'scrollbars=no,resizable=no,width=754,height=620');
}

// END PHOTO GALLERY POPUP CODE

/* Login box */
var networkRow = new Object();

networkRow.userField = function( action, input ){

	if( action == 'focus' ){
		input.className = 'userActive';
	}else if( action == 'blur' && ! input.value.length ){
		input.className = 'userInactive';
	}
}

networkRow.passwordField = function( action, input ){
	if( action == 'focus' ){
		input.className = 'passActive';
	} else if( action == 'blur' && ! input.value.length ){
		input.className = 'passInactive';
	}
	return;
}
}