   // ---------------------------------------------------------------------------
   // file: mbqp_index.js 
   // ---------------------------------------------------------------------------


   var	mapindex = 3 ;

   var	firsttime  = 1 ;
   var	scrolling  = 0 ;
   var	isLoggedIN = 0 ;
   var	isSU       = 0 ;
   var	lastColoredText = "" ;		// this is an object
   var	lastColoredBG   = "" ;		// this is an object
   var	lastPurchaseIdx = -1 ;
   var	updateLoginButton = 1 ;

   // var	infoCellHeight = 940 ;
   var	infoCellHeight = 1000 ;

   var	currSector = "Home" ;


   function setMapIndex( newindex ) {

	// alert( window.location );
	// if ( window.location != "http://www.lotterypowerpicks.com/" && window.location != "http://www.lotterypowerpicks.com/index.php" ) {
	   // window.location = "http://www.lotterypowerpicks.com/" ;
	// }

           // alert( "0. In setMapIndex - " );

	if ( newindex < 0 ) {
	   mapindex = -newindex ;
	   if ( firsttime == 1 ) {
		firsttime = 0;
	   } else {
		homeClicked();
	   }
        } else {
	   mapindex = newindex ;
	   homeClicked();
	}
   } 

   function setMapIndex2( newindex, sector ) {

	// alert( window.location );
           // alert( "1. In setMapIndex2 - Sector=" + sector );

/*
	if ( newindex < 0 ) {
	   mapindex = -newindex ;
	   if ( firsttime == 1 ) {
		firsttime = 0;
	   } else {
           // alert( "In setMapIndex2 - Sector=" + sector );
		if ( sector == "Home" ) { homeClicked(); }
		else if ( sector == "Europe1" ) { homeClickedEurope1(); }
		else if ( sector == "States1" ) { homeClickedStates1(); }
	   }
        } else {
	   mapindex = newindex ;

           // alert( "In setMapIndex2 - Sector=" + sector );

	   if ( sector == "Home" ) { homeClicked(); }
	   else if ( sector == "Europe1" ) { homeClickedEurope1(); }
	   else if ( sector == "States1" ) { homeClickedStates1(); }
	}
*/
   } 

   function getElmById( aID ) {
	var element = null; 

	if ( isMozilla || isIE5 ) { 
	   element = document.getElementById(aID);
	} else if ( isNetscape4 ) { 
	   element = document.layers[aID] ;
	} else if ( isIE4 ) {
	   element = document.all[aID]; 
	}
	return( element );
   } 

   function protectField( ) {
	alert( "Error: This Field is Protected" );
	return( false );
   }

   function save_showMap( img ) {
	// document.images[2].src = img ;
	// document.images[ mapindex ].src = img ;
	document.images[ "usmap" ].src = img ;
   }

   function showMap( img ) {

	var	new_image = img;
	switch	( img ) {
	case 'USAMAP_PBMM_BOTH.gif' :
		new_image = "http://chart.apis.google.com/chart?chf=bg,s,FFFFFF&chs=160x100&cht=t&chco=800080,FF0000,FF9900,0000FF,CCCCCC&chld=AKALCAFLHIMSNVUTWY&chd=t:100,100,25,75,100,100,100,100,100&chtm=usa" ;

		// new_image = "http://chart.apis.google.com/chart?chs=160x100&cht=t&chtm=usa&chco=f1f1f1,FFA500,FFA500,FF0000,40E0D0,0000FF&chld=CAGAILMDMAMINJNYOHTXVAWAARFLAZCTCODCDEIDINIAKSKYLAMEMNMOMTNENHNMNCNDOKORPARISCSDTNVTVIWIWV&chd=s:Afffffffffff999999999999999999999999999999999" ;

		// // new_image = "http://chart.apis.google.com/chart?chs=160x100&amp;cht=t&amp;chtm=usa&amp;chco=f1f1f1,FFA500,FFA500,FF0000,40E0D0,0000FF&amp;chld=CAGAILMDMAMINJNYOHTXVAWAARAZCTCODCDEFLIDINIAKSKYLAMEMNMOMTNENHNMNCNDOKORPARISCSDTNVTVIWIWV&amp;chd=s:Afffffffffff999999999999999999999999999999999" ;

		break;


	case 'USAMAP_PB.gif' :
		new_image = "http://chart.apis.google.com/chart?chf=bg,s,FFFFFF&chs=160x100&cht=t&chco=0000FF,FF0000,FF9900,0000FF,CCCCCC&chld=AKALCAFLHIMSNVUTWY&chd=t:100,100,100,75,100,100,100,100,100&chtm=usa" ;

		// new_image = "http://chart.apis.google.com/chart?chs=160x100&cht=t&chtm=usa&chco=f1f1f1,FFA500,FFA500,FF0000,40E0D0,0000FF&chld=ARFLAZCTCODCDEIDINIAKSKYLAMEMNMOMTNENHNMNCNDOKORPARISCSDTNVTVIWIWV&chd=s:999999999999999999999999999999999" ;

		// // new_image = "http://chart.apis.google.com/chart?chs=160x100&amp;cht=t&amp;chtm=usa&amp;chco=f1f1f1,FFA500,FFA500,FF0000,40E0D0,0000FF&amp;chld=ARAZCTCODCDEFLIDINIAKSKYLAMEMNMOMTNENHNMNCNDOKORPARISCSDTNVTVIWIWV&amp;chd=s:999999999999999999999999999999999" ;

		break;


	case 'USAMAP_MM.gif' :
		new_image = "http://chart.apis.google.com/chart?chf=bg,s,FFFFFF&chs=160x100&cht=t&chco=FF0000,FF0000,FF9900,0000FF,CCCCCC&chld=AKALCAFLHIMSNVUTWY&chd=t:100,100,25,100,100,100,100,100,100&chtm=usa" ;

		// new_image = "http://chart.apis.google.com/chart?chs=160x100&chtm=usa&chld=CAGAILMDMAMINJNYOHTXVAWA&chco=f1f1f1,ffa000,ff0000,0000ff&chd=s:Aeeeeeeeeeee&cht=t" ;
		break;

	// ****************************************

	case 'USAMAP_SLP_HL.gif' :
		// new_image = "http://chart.apis.google.com/chart?chs=160x100&cht=t&chtm=usa&chco=f1f1f1,8A2BE2,FF69B4&chld=CADCDEIDIAKSMNMTNHNMNDOKSDWV&chd=s:A9999999999999" ;
		new_image = "http://chart.apis.google.com/chart?chs=160x100&cht=t&chtm=usa&chco=f1f1f1,8A2BE2,FF69B4&chld=CADCDEIDIAKSMNMTNHNMNDOKSDWVVT&chd=s:A99999999999999" ;
		break;

	case 'USAMAP_SLP.gif' :
		new_image = "http://chart.apis.google.com/chart?chs=160x100&cht=t&chtm=usa&chco=f1f1f1,8A2BE2,8A2BE2&chld=CA&chd=s:9" ;
		break;

	case 'USAMAP_HL.gif' :
		// new_image = "http://chart.apis.google.com/chart?chs=160x100&cht=t&chtm=usa&chco=f1f1f1,FF69B4,FF69B4&chld=DCDEIDIAKSMNMTNHNMNDOKSDWV&chd=s:9999999999999" ;
		new_image = "http://chart.apis.google.com/chart?chs=160x100&cht=t&chtm=usa&chco=f1f1f1,FF69B4,FF69B4&chld=DCDEIDIAKSMNMTNHNMNDOKSDWVVT&chd=s:99999999999999" ;
		break;

	// ****************************************



	default:
		break;
	}
	document.images[ "usmap" ].src = new_image ;
   }


   function showSummaryPage( cellid, newpage ) {
	document.getElementById(cellid).innerHTML = "<iframe scrolling=NO frameborder=0 width=160 height=150 src="+newpage+"></iframe>" ;
   }

   function showPage( newpage ) {
	document.getElementById('InfoCell').innerHTML = "<iframe frameborder=0 width=510 height="+infoCellHeight+" src=http://"+document.domain+"/"+newpage+"></iframe>" ;
   }

   function changeGraphClicked( in_newpage ) {
	newpage = in_newpage+"&whichHome="+currSector ;
	showPage( newpage );
   }

/*
   function reloadClicked( ) {

	undoColor( lastColoredText );
	undoColor( lastColoredBG   );

	lastColoredText = doColorText( link42, 'WHITE', 'ORANGE' );
	lastColoredBG   = doColorBG(   cell42, 'WHITE', 'ORANGE' );

	lastPurchaseIdx = -1 ;
   }
*/


   function showPageScroll( newpage, cellTextObj, cellBgObj ) {
	scrolling = 1 ;
	showPage2( newpage, cellTextObj, cellBgObj );
	scrolling = 0 ;
   }


   function showHeaderPage( newpage ) {
        // alert( "In showHeaderPage " + newpage );
	document.getElementById('HeaderCell').innerHTML = "<iframe scrolling=NO frameborder=0 width=510 height=96 src="+newpage+"></iframe>" ;
   }


   function showPage2( newpage, cellTextObj, cellBgObj ) {

	// alert( "In showPage2 <" + typeof( cellTextObj ) + "> " + cellTextObj.style.backgroundColor );
	// alert( "In showPage2 <" + typeof( cellTextObj ) + "> " + cellTextObj.style.color );
	// alert( "In showPage2 <" + typeof( cellBgObj ) + "> " + cellBgObj );


	lastColoredText = undoColorText( lastColoredText );
	lastColoredBG   = undoColorBG( lastColoredBG   );

	lastColoredText = undoColorText( document.getElementById('cell1') );
	lastColoredText = undoColorText( document.getElementById('cell2') );
	lastColoredText = undoColorText( document.getElementById('cell3') );
	lastColoredText = undoColorText( document.getElementById('cell4') );
	lastColoredText = undoColorText( document.getElementById('cell4a') );
	lastColoredText = undoColorText( document.getElementById('cell5') );
	lastColoredBG   = undoColorBG( document.getElementById('cell1') );
	lastColoredBG   = undoColorBG( document.getElementById('cell2') );
	lastColoredBG   = undoColorBG( document.getElementById('cell3') );
	lastColoredBG   = undoColorBG( document.getElementById('cell4') );
	lastColoredBG   = undoColorBG( document.getElementById('cell4a') );
	lastColoredBG   = undoColorBG( document.getElementById('cell5') );
/*
*/


	// alert( "In showPage2 - 3 <" + typeof( cellTextObj ) + "> " + cellTextObj.style.color );


	lastColoredText = doColorText( cellTextObj, 'WHITE', 'ORANGE' );
	lastColoredBG   = doColorBG( cellTextObj, 'WHITE', 'ORANGE' );

	if ( newpage != "" ) {
	   if ( scrolling == 0 ) {
		// document.getElementById('InfoCell').innerHTML = "<iframe scrolling=NO frameborder=0 width=510 height=930 src="+newpage+"></iframe>" ;
		document.getElementById('InfoCell').innerHTML = "<iframe scrolling=NO frameborder=0 width=510 height="+infoCellHeight+" src="+newpage+"></iframe>" ;
	   } else {
		// document.getElementById('InfoCell').innerHTML = "<iframe frameborder=0 width=510 height=930 src="+newpage+"></iframe>" ;
		document.getElementById('InfoCell').innerHTML = "<iframe frameborder=0 width=510 height="+infoCellHeight+" src="+newpage+"></iframe>" ;
	   }
	}
   }


   function isPurchaseAmtSet( ) {

	if ( lastPurchaseIdx > - 1 ) {
	   return( true );
	}
	alert( "Error: You must Select a Purchase Amount !!! " );
	return( false );
   }


   function setPurchase( thisform, idx ) {

	itemnum = thisform.Items[idx].value ;

	if ( lastPurchaseIdx > - 1 ) {
	   thisform.Items[lastPurchaseIdx].checked = false ;
	}

	lastPurchaseIdx = idx ;

	if ( thisform.Items[idx].checked == false ) {

	   lastPurchaseIdx = -1 ;
	   thisform.item_number.value = "undefined";
	   thisform.item_name.value = "Item Undefined";
	   thisform.amount.value    = "0.00";
	
	} else if ( itemnum == "mbqp_5" ) {

	   thisform.item_number.value = itemnum;
	   thisform.item_name.value = "MBQP 52 Credits";
	   thisform.amount.value    = "5.00";

	} else if ( itemnum == "mbqp_10" ) {

	   thisform.item_number.value = itemnum;
	   thisform.item_name.value = "MBQP 110 Credits";
	   thisform.amount.value    = "10.00";

	} else if ( itemnum == "mbqp_15" ) {

	   thisform.item_number.value = itemnum;
	   thisform.item_name.value = "MBQP 175 Credits";
	   thisform.amount.value    = "15.00";

	} else if ( itemnum == "mbqp_20" ) {

	   thisform.item_number.value = itemnum;
	   thisform.item_name.value = "MBQP 240 Credits";
	   thisform.amount.value    = "20.00";

	} else if ( itemnum == "mbqp_25" ) {

	   thisform.item_number.value = itemnum;
	   thisform.item_name.value = "MBQP 325 Credits";
	   thisform.amount.value    = "25.00";

	} else if ( itemnum == "mbqp_50" ) {

	   thisform.item_number.value = itemnum;
	   thisform.item_name.value = "MBQP 750 Credits";
	   thisform.amount.value    = "50.00";

	} else if ( itemnum == "mbqp_100" ) {

	   thisform.item_number.value = itemnum;
	   thisform.item_name.value = "MBQP 1500 Credits";
	   thisform.amount.value    = "100.00";

	}
	return true;
   }


/*
   function setLoginButton( newval ) {

	// alert( "in setLoginButton");

	scrolling = 0 ;
	oldval = document.getElementById('But1').value ;
	if ( oldval == "" ) oldval = "Logout" ;

	if ( oldval == "Logout" ) {
	   document.getElementById('But1').value = "Login" ;
	   isLoggedIN = 0 ;
	} else if ( oldval == "submit" ) {
	   document.getElementById('But1').value = "Logout" ;
	   isLoggedIN = 0 ;
	} else {
	   document.getElementById('But1').value = "submit" ;
	   isLoggedIN = newval ;

	   // lastColoredText = undoColorText( lastColoredText );
	   // lastColoredBG   = undoColorBG( lastColoredBG   );

	   // lastColoredText = doColorText( document.getElementById('But1'), 'BLACK', 'GREEN' );
	   // lastColoredBG   = doColorBG( document.getElementById('But1'), 'BLACK', 'GREEN' );

	   if ( newval == "pb" ) {
		showMap( 'USAMAP_PB.gif' );
		showSummaryPage( "MMCell", "pb_current_jackpot.htm" );
		showSummaryPage( "PBCell", "pb_results_past6.htm" );
		// showPage2( "", "cell2", 'link2' );
		showPage2( "", document.getElementById('cell2'), document.getElementById('link2') );
	   } else if ( newval == "mm" ) {
		showMap( 'USAMAP_MM.gif' );
		showSummaryPage( "MMCell", "mm_current_jackpot.htm" );
		showSummaryPage( "PBCell", "mm_results_past6.htm" );
		// showPage2( "", "cell3", 'link3' );
		showPage2( "", document.getElementById('cell3'), document.getElementById('link3') );
	   }
	}
   }
*/


   function setLoginButtonSU( in_newval ) {
	isSU = 1 ;
	setLoginButton( in_newval );
   }


   function setLoginButton( in_newval ) {

	newval = in_newval ;

	// alert( "in setLoginButton 1");

	// if ( newval == "off" ) {
        if ( newval == "off" || newval == "" ) {
	   newval = "";
           isLoggedIN = 1 ;
	   updateLoginButton = 1 ;
	} else {
	   if ( isLoggedIN != 0 ) {
		return;
	   }
	}
	if ( updateLoginButton == 0 ) {
	   updateLoginButton = 1 ;
	   return;
	}
        scrolling = 0 ;

	// alert( "in setLoginButton 2");

        if ( newval == "off" || newval == "" ) {
           document.getElementById('But1').value = "Login" ;
           isLoggedIN = 0 ;
	   isSU = 0 ;
        } else {
           document.getElementById('But1').value = "Logout" ;
           isLoggedIN = newval ;

	   // alert( "in setLoginButton 3");

	   showHeaderPage( "headline.htm" ) ;
           if ( newval == "pb" ) {
	   // alert( "in setLoginButton 3pb");
                showMap( 'USAMAP_PB.gif' );
                showSummaryPage( "MMCell", "pb_current_jackpot.htm" );
                showSummaryPage( "PBCell", "pb_results_past6.htm" );
                showPage2( "", "cell2", 'link2' );
           // } else {
           } else if ( newval == "mm" ) {
		// alert( "in setLoginButton 3mm");
                showMap( 'USAMAP_MM.gif' );
                showSummaryPage( "MMCell", "mm_current_jackpot.htm" );
                showSummaryPage( "PBCell", "mm_results_past6.htm" );
                showPage2( "", "cell3", 'link3' );
           }
        }
   }


   function confirmPurchase() {
	var reply = confirm("Are you sure?");
	return( reply );
   }



   function loginButtonPushed() {

        if ( document.getElementById('But1').value == "Login" ) {

           showPage( "login.php" );
           if ( lastColoredText != "" ) {
                undoColorText( lastColoredText );
                undoColorBG( lastColoredBG   );
           }
           // lastColoredLink = doColor( But1, 'WHITE', 'RED' );
           // lastColoredCell = doColor( But1, 'WHITE', 'RED' );

	   lastColoredText = doColorText(  document.getElementById('But1'), 'WHITE', 'RED' );
	   lastColoredBG   = doColorBG(  document.getElementById('But1'), 'WHITE', 'RED' );

        } else {
           var logout = confirm("Do you Really Want to Logout?");
           if ( logout == true ) {
                setLoginButton( "off" );
                isLoggedIN = 0 ;
	        isSU = 0 ;
                updateLoginButton = 1 ;
		window.location = "http://www.lotterypowerpicks.com/thank_you.htm";
                // homeClicked( );
           }
        }
   }


   function joinButtonPushed() {
	showPage( "join.php" );
   }


// *******************

   function referClicked() {

	if ( isLoggedIN == 0 ) {
	   newpage = "notloggedin.htm" ;		// Do Not Change This !!!
	} else {
	   newpage = "refersomeone.php" ;
	}
	// document.getElementById('InfoCell').innerHTML = "<iframe frameborder=0 width=510 height=930 src="+newpage+"></iframe>" ;
	document.getElementById('InfoCell').innerHTML = "<iframe frameborder=0 width=510 height="+infoCellHeight+" src="+newpage+"></iframe>" ;
   }


   function changeuserClicked() {

	if ( isLoggedIN == 0 ) {
	   newpage = "notloggedin.htm" ;		// Do Not Change This !!!
	} else {
	   newpage = "changeuser.php" ;
	}
	// document.getElementById('InfoCell').innerHTML = "<iframe frameborder=0 width=510 height=930 src="+newpage+"></iframe>" ;
	document.getElementById('InfoCell').innerHTML = "<iframe frameborder=0 width=510 height="+infoCellHeight+" src="+newpage+"></iframe>" ;
   }


// *******************


   function homeClicked() {

	scrolling = 0 ;

	if ( isLoggedIN == 0 ) {
	   // newpage = "welcome.php" ;
	   // newpage = "home.htm" ;
	   scrolling = 1 ;
	   newpage = "home.php" ;		// Do Not Change This !!!
	   newpage ="http://www.lotterypowerpicks.com/home.php"; 
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=mm&submit=mm" ;
	   } else {
		// newpage = "updatescreen.php" ;
		newpage ="http://www.lotterypowerpicks.com/updatescreen.php"; 
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline.htm" ) ;
   	showMap( 'USAMAP_PBMM_BOTH.gif' );

	showSummaryPage( "MMCell", 'mm_results_past6.htm' );
	showSummaryPage( "PBCell", 'pb_results_past6.htm' );

	// showPage2( newpage, "cell1", 'link1' );
	showPage2( newpage, document.getElementById('cell1'), document.getElementById('link1') );
	scrolling = 0 ;
   }

// *******************************

   function homeClickedEurope1() {

        // alert( "In homeClickedEurope1 " );

	scrolling = 0 ;

	if ( isLoggedIN == 0 ) {
	   scrolling = 1 ;
	   newpage ="http://www.lotterypowerpicks.com/home.php?whichHome=Europe1"; 
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=em&submit=em" ;
	   } else {
		newpage ="http://www.lotterypowerpicks.com/updatescreen.php"; 
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline_EM.htm" ) ;
   	showMap( 'http://www.lotterypowerpicks.com/images/EUMAP_EM.gif' );
   	// showMap( 'USAMAP_PBMM_BOTH.gif' );

	showSummaryPage( "PBCell", 'em_results_past6.htm' );
	showSummaryPage( "MMCell", 'I6_results_past6.htm' );

	showPage2( newpage, document.getElementById('cell1'), document.getElementById('link1') );
	scrolling = 0 ;
   }

   function homeClickedStates1() {

        // alert( "In homeClickedStates1 " );

	scrolling = 0 ;

	if ( isLoggedIN == 0 ) {
	   scrolling = 1 ;
	   newpage ="http://www.lotterypowerpicks.com/home.php?whichHome=States1"; 
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=slp&submit=slp" ;
	   } else {
		newpage ="http://www.lotterypowerpicks.com/updatescreen.php"; 
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline_slp_hl.htm" ) ;
   	showMap( 'USAMAP_SLP_HL.gif' );
   	// showMap( 'http://www.lotterypowerpicks.com/images/USAMAP_CAL_HL.gif' );
   	// showMap( 'USAMAP_PBMM_BOTH.gif' );

	showSummaryPage( "PBCell", 'slp_results_past6.htm' );
	showSummaryPage( "MMCell", 'hl_results_past6.htm' );

	showPage2( newpage, document.getElementById('cell1'), document.getElementById('link1') );
	scrolling = 0 ;
   }

// *******************************


   function powerballClicked() {

	// scrolling = 0 ;

	scrolling = 1 ;

	if ( isLoggedIN == 0 ) {
	   // newpage = "gameinfo.php?Ugame=pb&submit=pb" ;
	   newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=pb&submit=pb" ;
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=pb&submit=pb" ;
	   } else {
		// newpage = "updatescreen.php" ;
	   	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=pb&submit=pb" ;
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline.htm" ) ;
   	showMap( 'USAMAP_PB.gif' );

	showSummaryPage( "MMCell", "pb_results_past6.htm" );
	showSummaryPage( "PBCell", "pb_current_jackpot.htm" );


	showPage2( newpage, document.getElementById('cell2'), document.getElementById('link2') );

	scrolling = 0 ;
   }


   function megamillionsClicked() {

	// scrolling = 0 ;

	scrolling = 1 ;
	if ( isLoggedIN == 0 ) {
	   // newpage = "gameinfo.php?Ugame=mm&submit=mm" ;
	   newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=mm&submit=mm" ;
	} else {
	   if ( isSU == 0 ) {
	   	newpage ="http://www.lotterypowerpicks.com/loggedin.php?Ugame=mm&submit=mm" ;
	   } else {
		// newpage = "updatescreen.php" ;
		// newpage ="http://www.lotterypowerpicks.com/updatescreen.php"; 
	   	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=mm&submit=mm" ;
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline.htm" ) ;
   	showMap( 'USAMAP_MM.gif' );

	showSummaryPage( "MMCell", "mm_current_jackpot.htm" );
	showSummaryPage( "PBCell", "mm_results_past6.htm" );

	showPage2( newpage, document.getElementById('cell3'), document.getElementById('link3') );

	scrolling = 0 ;
   }

   function lotto649Clicked() {

        // alert( "In lotto649Clicked " );

        scrolling = 1 ;
        if ( isLoggedIN == 0 ) {
           newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=L6&submit=L6" ;
        } else {
	   if ( isSU == 0 ) {
           	newpage ="http://www.lotterypowerpicks.com/loggedin.php?Ugame=L6&submit=L6" ;
	   } else {
		// newpage = "updatescreen.php" ;
           	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=L6&submit=L6" ;
	   }
           updateLoginButton = 0 ;
        }

        showHeaderPage( "headline_CDA.htm" ) ;
        showMap( 'CDAMAP.gif' );

        showSummaryPage( "MMCell", "L6_current_jackpot.htm" );
        showSummaryPage( "PBCell", "L6_results_past6.htm" );

        showPage2( newpage, document.getElementById('cell4'), document.getElementById('link4') );

        scrolling = 0 ;
   }


   function super7Clicked() {

        // alert( "In super7Clicked " );

        scrolling = 1 ;
        if ( isLoggedIN == 0 ) {
           newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=S7&submit=S7" ;
        } else {
	   if ( isSU == 0 ) {
           	newpage ="http://www.lotterypowerpicks.com/loggedin.php?Ugame=S7&submit=S7" ;
	   } else {
		// newpage = "updatescreen.php" ;
           	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=S7&submit=S7" ;
	   }
           updateLoginButton = 0 ;
        }

        showHeaderPage( "headline_S7.htm" ) ;
        showMap( 'CDAMAP.gif' );

        showSummaryPage( "MMCell", "S7_current_jackpot.htm" );
        showSummaryPage( "PBCell", "S7_results_past6.htm" );

        showPage2( newpage, document.getElementById('cell4a'), document.getElementById('link4a') );

        scrolling = 0 ;
   }


// ******************************* Start Nov 2007 *******************************

   function euromillionsClicked() {

	scrolling = 1 ;

	if ( isLoggedIN == 0 ) {
	   newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=em&submit=em" ;
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=em&submit=em" ;
	   } else {
	   	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=em&submit=em" ;
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline_EM.htm" ) ;
   	showMap( 'http://www.lotterypowerpicks.com/images/EUMAP_EM.gif' );

	showSummaryPage( "MMCell", "em_results_past6.htm" );
	showSummaryPage( "PBCell", "em_current_jackpot.htm" );

	showPage2( newpage, document.getElementById('cell2'), document.getElementById('link2') );

	scrolling = 0 ;
   }

   // ******************************* 

   function irishlottoClicked() {

	scrolling = 1 ;

	if ( isLoggedIN == 0 ) {
	   newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=I6&submit=I6" ;
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=I6&submit=I6" ;
	   } else {
	   	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=I6&submit=I6" ;
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline_EM.htm" ) ;
   	showMap( 'http://www.lotterypowerpicks.com/images/EUMAP_IRL.gif' );

	showSummaryPage( "MMCell", "I6_results_past6.htm" );
	showSummaryPage( "PBCell", "I6_current_jackpot.htm" );

	showPage2( newpage, document.getElementById('cell3'), document.getElementById('link3') );

	scrolling = 0 ;
   }

   // ******************************* 

   function uklottoClicked() {

	scrolling = 1 ;

	if ( isLoggedIN == 0 ) {
	   newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=U6&submit=U6" ;
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=U6&submit=U6" ;
	   } else {
	   	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=U6&submit=U6" ;
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline_UK.htm" ) ;
   	showMap( 'http://www.lotterypowerpicks.com/images/EUMAP_UK.gif' );

	showSummaryPage( "MMCell", "U6_results_past6.htm" );
	showSummaryPage( "PBCell", "U6_current_jackpot.htm" );

	showPage2( newpage, document.getElementById('cell4'), document.getElementById('link4') );

	scrolling = 0 ;
   }

   // ******************************* 

   function thunderballClicked() {

	scrolling = 1 ;

	if ( isLoggedIN == 0 ) {
	   newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=tb&submit=tb" ;
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=tb&submit=tb" ;
	   } else {
	   	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=tb&submit=tb" ;
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline_UK.htm" ) ;
   	showMap( 'http://www.lotterypowerpicks.com/images/EUMAP_TB.gif' );

	showSummaryPage( "MMCell", "tb_results_past6.htm" );
	showSummaryPage( "PBCell", "tb_current_jackpot.htm" );

	showPage2( newpage, document.getElementById('cell4a'), document.getElementById('link4a') );

	scrolling = 0 ;
   }

   // ******************************* 

   function superlottoplusClicked() {

	scrolling = 1 ;

	if ( isLoggedIN == 0 ) {
	   newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=slp&submit=slp" ;
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=slp&submit=slp" ;
	   } else {
	   	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=slp&submit=slp" ;
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline_slp_hl.htm" ) ;
   	showMap( 'USAMAP_SLP.gif' );
   	// showMap( 'http://www.lotterypowerpicks.com/images/USAMAP_CAL.gif' );

	showSummaryPage( "MMCell", "slp_results_past6.htm" );
	showSummaryPage( "PBCell", "slp_current_jackpot.htm" );

	showPage2( newpage, document.getElementById('cell2'), document.getElementById('link2') );

	scrolling = 0 ;
   }

   // ******************************* 

   function hotlottoClicked() {

	scrolling = 1 ;

	if ( isLoggedIN == 0 ) {
	   newpage ="http://www.lotterypowerpicks.com/gameinfo.php?Ugame=hl&submit=hl" ;
	} else {
	   if ( isSU == 0 ) {
	   	newpage = "http://www.lotterypowerpicks.com/loggedin.php?Ugame=hl&submit=hl" ;
	   } else {
	   	newpage ="http://www.lotterypowerpicks.com/updatescreen.php?Ugame=hl&submit=hl" ;
	   }
	   updateLoginButton = 0 ;
	}

	showHeaderPage( "headline_slp_hl.htm" ) ;
   	showMap( 'USAMAP_HL.gif' );
   	// showMap( 'http://www.lotterypowerpicks.com/images/USAMAP_HL.gif' );

	showSummaryPage( "MMCell", "hl_results_past6.htm" );
	showSummaryPage( "PBCell", "hl_current_jackpot.htm" );

	showPage2( newpage, document.getElementById('cell3'), document.getElementById('link3') );

	scrolling = 0 ;
   }

// ******************************* End Nov 2007 *******************************
   // ******************************* 

   function newSectorSelected( sector ) {

	// alert( "newSectorSelected - "+sector );

	currSector = sector;

	if ( sector == "Home" ) { 
	   document.getElementById("cell1").innerHTML = "<a name=\"link1\" href=\"javascript:homeClicked()\">Home</a>";
	   document.getElementById("cell2").innerHTML = "<a name=\"link2\" href=\"javascript:powerballClicked()\">Powerball</a>";
	   document.getElementById("cell3").innerHTML = "<a name=\"link3\" href=\"javascript:megamillionsClicked()\">Mega Millions</a>";
	   document.getElementById("cell4").innerHTML = "<a name=\"link4\" href=\"javascript:lotto649Clicked()\">Lotto 6/49</a>";
	   document.getElementById("cell4a").innerHTML = "<a name=\"link4a\" href=\"javascript:super7Clicked()\">Lotto Max (S7)</a>";
	   homeClicked();
	} else if ( sector == "Europe1" ) { 
	   document.getElementById("cell1").innerHTML = "<a name=\"link1\" href=\"javascript:homeClickedEurope1()\">Home</a>";
	   document.getElementById("cell2").innerHTML = "<a name=\"link2\" href=\"javascript:euromillionsClicked()\">EuroMillions</a>";
	   document.getElementById("cell3").innerHTML = "<a name=\"link3\" href=\"javascript:irishlottoClicked()\">Irish Lotto</a>";
	   document.getElementById("cell4").innerHTML = "<a name=\"link4\" href=\"javascript:uklottoClicked()\">UK Lotto</a>";
	   document.getElementById("cell4a").innerHTML = "<a name=\"link4a\" href=\"javascript:thunderballClicked()\">Thunderball</a>";
	   homeClickedEurope1();
	} else if ( sector == "States1" ) { 
	   document.getElementById("cell1").innerHTML = "<a name=\"link1\" href=\"javascript:homeClickedStates1()\">Home</a>";
	   document.getElementById("cell2").innerHTML = "<a name=\"link2\" href=\"javascript:superlottoplusClicked()\">SuperLotto+</a>";
	   document.getElementById("cell3").innerHTML = "<a name=\"link3\" href=\"javascript:hotlottoClicked()\">Hot Lotto</a>";
	   document.getElementById("cell4").innerHTML = "-- ";
	   document.getElementById("cell4a").innerHTML = "-- ";
	   homeClickedStates1();
	}

   }

   function doColorText( item, color, bg ) {
	// alert( "In doColorText" + item );
	if ( item && item != "" ) {
	   item.style.color = color;               // changes text color
	}
        return( item );
   }

   function doColorBG( item, color, bg ) {
	// alert( "In doColorBG" + item );
	if ( item && item != "" ) {
	   item.style.backgroundColor = bg;        // changes background
	}
        return( item );
   }

//***************
/*
   function doColor( item, color, bg ) {
	if ( item != "" ) {
	   item.style.color = color;               // changes text color
	   item.style.backgroundColor = bg;        // changes background
	}
        return( item );
   }


   function undoColor( item ) {
	if ( item != "" ) {
	   item.style.color           = "" ;       // sets color back to default
	   item.style.backgroundColor = "";        // sets background todefault
	}
        return( "" );
   }
*/
//***************

   function undoColorText( item ) {
	if ( item && item != "" ) {
	   item.style.color           = "" ;       // sets color back to default
	   // item.style.backgroundColor = "";        // sets background todefault
	}
        return( "" );
   }

   function undoColorBG( item ) {
	if ( item && item != "" ) {
	   // item.style.color           = "" ;       // sets color back to default
	   item.style.backgroundColor = "";        // sets background todefault
	}
        return( "" );
   }

   function myprint() {

   // EXAMPLES of CSS  --- http://www.webconcerns.co.uk/css/default.asp
   // TRICKS -- GOOD FOR --- PRINTING http://www.webcredible.co.uk/user-friendly-resources/css/css-tricks.shtml

	window.parent.frame2.focus();
	window.print();
   }




