
// Start Scripts

//This function called from the body onload to call all other scripts
function start(){


changeText1();
changeText2();
changeText7();
slideit();




}







// Load header Banner
function changeText1(){
var newHTML= "<img src='images/Final_Banner.png' width='940'/>";
//var sPath = window.location.pathname;	
//var sPage2 = (sPath.lastIndexOf('C6F_Home'));
//var myNum2 = sPage2;
//if(myNum2 > 1 )
//{newHTML = "<img src='images/Final_Banner.png' width='940'/>";}
//else
//{newHTML = "<img src='images/Final_Banner.png' width='940'/>";}
	
document.getElementById('banner_div').innerHTML = newHTML;

}

// Load Navigation Bar Content, Navigation is built by CSS
function changeText2(){


var newHTML2 = "<table cellspacing='0' cellpadding='0' border='0' ><tr><td rowspan='4' background='images/leftnav_vbar.gif'width='15' >&nbsp;</td><td background='images/leftnav_botbg1.gif' width='205' >&nbsp;<img name='slide1' src='images/web_080109-N-1655H-006.png' width='195' height='350' /></td></tr><tr><td background='images/leftnav_botbg1.gif'><div id='nav-menu'><br /><ul><li><a href='index.html'>Home</a></li><!--<li><a href='C6F_Home.html'>U.S. Sixth Fleet</a></li>--><li><a href='Biographies.html'>Biographies</a></li><li><a href='Photoreleasespage.html'>Recent Photo Releases</a></li><li><a href='http://www.navy.mil/local/naveur/'>Media Archive</a></li><li><a href='welcomeaboard.html'>Welcome Aboard</a></li><li><a href='travelpage.html'>Travel</a><li><a href='N1.html'>Careers</a></li><li><a href='AORPAGE.html'>Area Of Responsibility</a></li><li><a href='helpfullinks.html'>Helpful Links</a></li><!--<li><a href='#'>Media Press Kit</a></li>--><li><a href='contact_us.html'>Contact Us</a></li><li><a href='http://www.navy.mil/'>U.S. Navy</a></li><li><a href='http://www.usmc.mil'>U.S. Marine Corps</a></li><!--<li><li><a href='http://www.eucom.mil'>U.S. European Command</a></li><li><a href='http://www.africom.mil'>U.S. Africa Command</a></li><li></ul></div><br /></td></tr><tr><td background='images/leftnav_botbg1.gif'  align='center'>";

//****Change logo for COMSIXTHFLEET PAGE
//var sPath = window.location.pathname;	
//var sPage2 = (sPath.lastIndexOf('C6F_Home'));
//var myNum2 = sPage2;
//if(myNum2 > 1 )
//{newHTML3 = "<img src='images/C6F Logo.png' />";}
//else
//{newHTML3 = "<img src='images/NAVEUR-NAVAF 4 stars logo1.png' />";}

var newHTML3 = "<img src='images/NAVEUR-NAVAF 4 stars logo1.png' />";
var newHTML4="</td></tr><tr><td background='images/leftnav_botbg1.gif'  height='490'>&nbsp;</td></tr></table>";

//****Sum Text Strings    
    newHTML2= newHTML2 + newHTML3 + newHTML4;


	document.getElementById('nav_div').innerHTML = newHTML2;
}

// Load Banner Bar Content
function changeText7(){


<!--**********Start of Command Information Links**********-->


var newHTML7 ="<table width='160' border='0' align='top' cellpadding='0' cellspacing='0'><tr><td bgcolor='#D4D0C8' align='center' valign='top'><p class='style14'></a><a href='http://twitter.com/naveur_navaf'><img src='images/twitter.png' alt='twitter' width='85' height='81' border='0' /></a><a href='http://www.facebook.com/pages/Naples-Italy/US-Naval-Forces-Europe-AfricaUS-Sixth-Fleet/132785733915'><img src='images/facebook.png' alt='face book' width='85' height='81' border='0' /></a><br /><br/><a href='apshome.html'><img height='82' alt='Africa Partnership Station' src='images/APS_LOGO.png' width='170' border='0' /></a><br /><br /><a href='http://www.suicidepreventionlifeline.org/Veterans/Default.aspx' target='_blank'><img src='images/Lifeline.jpg' alt='Lifeline' width='170' height='82' border='0' /></a><br /><br /><a href='http://www.navy.mil/maritime/' target='_blank'><img height='82' alt='Maritime Strategy' src='images/maritime.jpg' width='170' border='0' /></a><br /><br /><a href='http://www.facebook.com/search/?ref=search&q=CNE-CNA&init=quick#/profile.php?ref=profile&id=100000581370339'><img height='82' alt='PEP' src='images/PEP.png' width='170' border='0' /></a><br /><br /><a href='http://www.naveur-navaf.navy.mil/Band%20Webpage/band_home.html' target='_blank'><img height='82' alt='Naval Forces Europe Band' src='images/BAND.jpg' width='170' border='0' /></a><br /><br /><a href='https://www.cnic.navy.mil/Naples/Programs/HealthAwareness/index.htm' target='_blank'><img height='82' alt='Health Awareness' src='images/Health_Awareness_Banner.png' width='170' border='0' /></a><br /><br /><a href='http://www.ucanquit2.org' target='_blank'><img height='82' alt='Quitting Tobacco' src='images/tobacco.jpg' width='170' border='0' /></a><br /><br /><a href='http://www.stuttgart.army.mil/sites/marine_fro/index.htm' target='_blank'><img height='82' alt='Family Readiness' src='images/Familyreadiness.jpg' width='170' border='0' /></a><br /><br /><a href='ombudsman_note.html'/naveur_navaf'><img src='images/OMBUD.png' alt='twitter' width='170' height='81' border='0' /></a><br /><br /><a href='http://www.safetycenter.navy.mil/'><img src='images/stay_safe.jpg' alt='Safetycenter' width='170' height='82' border='0' /></a></td></tr></table>";

<!--**********End of Command Information Links**********-->
	
	document.getElementById('right_div').innerHTML = newHTML7;
}

<!--**********Start of Photo Rotator**********-->

//Image Rotator
//Prelaod the images. Provide the path to the images 
var image1=new Image()
image1.src="images/110708-N-EF447-121.jpg"
var image2=new Image()
image2.src="images/110727-N-OV802-071.jpg"
var image3=new Image()
image3.src="images/110717-N-EF447-026.jpg"
var image4=new Image()
image4.src="images/110729-N-EF447-121.jpg"
var image5=new Image()
image5.src="images/110717-N-EF447-091.jpg"
var image6=new Image()
image6.src="images/110809-N-CT127-073.jpg"
var image7=new Image()
image7.src="images/110719-N-EF447-012.jpg"
var image8=new Image()
image8.src="images/110814-N-CT127-085.jpg"
var image9=new Image()
image9.src="images/110726-N-OV802-156.jpg"
var image10=new Image()
image10.src="images/110817-N-EQ988-001.jpg"
var image11=new Image()
image11.src="images/110730-N-GH121-081.jpg"

<!--**********End Photo Rotator**********-->

//variable that will increment through the images
var step=1
function slideit(){
//if browser does not support the image object, exit.
if (!document.images)
return
//
document.images.slide1.src=eval("image"+step+".src");
//number of images
if (step<11)
step++
else
step=1
//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",5000)
}


//World Clock

function GetTime() {
var dt = new Date();
var def = dt.getTimezoneOffset()/60;
var gmt = (dt.getHours() + def);
//document.clock.local.value = (IfZero(dt.getHours()) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()));
var ending = ":" + IfZero(dt.getMinutes()) + ":" +  IfZero(dt.getSeconds());
var rome =check24(((gmt + 2) > 24) ? ((gmt + 2) - 24) : (gmt + 2));
//var rome =check24(((gmt + 2) > 24) ? ((gmt + 2) - 24) : (gmt + 2));
document.clock.rome.value = (IfZero(rome) + ending);
var isr =check24(((gmt + 3) > 24) ? ((gmt + 3) - 24) : (gmt + 2));
document.clock.Israel.value = (IfZero(isr) + ending);
var msw =check24(((gmt + 3) > 24) ? ((gmt + 3) - 24) : (gmt + 3));
document.clock.msw.value = (IfZero(msw) + ending);
//var baku =check24(((gmt + 4) > 24) ? ((gmt + 4) - 24) : (gmt + 4));
//document.clock.baku.value = (IfZero(baku) + ending);
//var del =check24(((gmt + 5) > 24) ? ((gmt + 5) - 24) : (gmt + 5));
//document.clock.del.value = (IfZero(del) + ending);
//var dh =check24(((gmt + 6) > 24) ? ((gmt + 6) - 24) : (gmt + 6));
//document.clock.dh.value = (IfZero(dh) + ending);
//var kok =check24(((gmt +7 ) > 24) ? ((gmt +7 ) - 24) : (gmt + 7));
//document.clock.kok.value = (IfZero(kok) + ending);
//var ho =check24(((gmt + 8) > 24) ? ((gmt + 8) - 24) : (gmt + 8));
//document.clock.ho.value = (IfZero(ho) + ending);
//var tky =check24(((gmt + 9) > 24) ? ((gmt + 9) - 24) : (gmt + 9));
//document.clock.tky.value = (IfZero(tky) + ending);
//var sdn =check24(((gmt + 10) > 24) ? ((gmt + 10) - 24) : (gmt + 10));
//document.clock.sdn.value = (IfZero(sdn) + ending);
//var mag =check24(((gmt + 11) > 24) ? ((gmt + 11) - 24) : (gmt + 11));
//document.clock.mag.value = (IfZero(mag) + ending);
//var wll =check24(((gmt + 12) > 24) ? ((gmt + 12) - 24) : (gmt + 12));
//document.clock.wll.value = (IfZero(wll) + ending);

var _GMT =check24(((gmt) > 24) ? ((gmt) - 24) : (gmt));

document.clock._GMT.value = (IfZero(_GMT) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()));
//var eniw =check24(((gmt + (24-12)) > 24) ? ((gmt + (24-12)) - 24) : (gmt + (24-12)));
//document.clock.eniw.value = (IfZero(eniw) + ending);
//var sam =check24(((gmt + (24-11)) > 24) ? ((gmt + (24-11)) - 24) : (gmt + (24-11)));
//document.clock.sam.value = (IfZero(sam) + ending);
//var haw =check24(((gmt + (24-10)) > 24) ? ((gmt + (24-10)) - 24) : (gmt + (24-10)));
//document.clock.Hawaii.value = (IfZero(haw) + ending);
//var ala =check24(((gmt + (24-9)) > 24) ? ((gmt + (24-9)) - 24) : (gmt + (24-9)));
//document.clock.alaska.value = (IfZero(ala) + ending);
//var pacif =check24(((gmt + (24-8)) >= 24) ? ((gmt + (24-8)) - 24) : (gmt + (24-8)));
//document.clock.pacif.value = (IfZero(pacif) + ending);
//var mount =check24(((gmt + (24-7)) > 24) ? ((gmt + (24-7)) - 24) : (gmt + (24-7)));
//document.clock.mount.value = (IfZero(mount) + ending);
//var center =check24(((gmt + (24-6)) > 24) ? ((gmt + (24-6)) - 24) : (gmt + (24-6)));
//document.clock.center.value = (IfZero(center) + ending);
//var east =check24(((gmt + (24-5)) > 24) ? ((gmt + (24-5)) - 24) : (gmt + (24-5)));
//document.clock.east.value = (IfZero(east) + ending);
//var atl =check24(((gmt + (24-4)) > 24) ? ((gmt + (24-4)) - 24) : (gmt + (24-4)));
//document.clock.atl.value = (IfZero(atl) + ending);
//var bra =check24(((gmt + (24-3)) > 24) ? ((gmt + (24-3)) - 24) : (gmt + (24-3)));
//bra = (bra >= 24) ? bra - 24 : bra;
//document.clock.bra.value = (IfZero(bra) + ending);
//var mid =check24(((gmt + (24-2)) > 24) ? ((gmt + (24-2)) - 24) : (gmt + (24-2)));
//mid = (mid >= 24) ? mid - 24 : mid;
//document.clock.mid.value = (IfZero(mid) + ending);
//var azo =check24(((gmt + (24-1)) > 24) ? ((gmt + (24-1)) - 24) : (gmt + (24-1)));
//azo = (azo >= 24) ? azo - 24 : azo;
//document.clock.azo.value = (IfZero(azo) + ending);
setTimeout("GetTime()", 1000);
}
function IfZero(num) {
return ((num <= 9) ? ("0" + num) : num);
}
function check24(hour) {
return (hour >= 24) ? hour - 24 : hour;
}

