<!-- Begin

var delay=12000 //set delay in miliseconds
var curindex=0

var Pic=new Array()

	Pic[0]="http://newsphere.org/images/slideshow_10.jpg"
	Pic[1]="http://newsphere.org/images/slideshow_1.jpg"
	Pic[2]="http://newsphere.org/images/slideshow_2.jpg"
	Pic[3]="http://newsphere.org/images/slideshow_3.jpg"
	Pic[4]="http://newsphere.org/images/slideshow_4.jpg"
	Pic[5]="http://newsphere.org/images/slideshow_5.jpg"
	Pic[6]="http://newsphere.org/images/slideshow_6.jpg"
	Pic[7]="http://newsphere.org/images/slideshow_7.jpg"
	Pic[8]="http://newsphere.org/images/slideshow_8.jpg"
	Pic[9]="http://newsphere.org/images/slideshow_9.jpg"
	Pic[10]="http://newsphere.org/images/slideshow_10.jpg"

//specify corresponding links below

  var imagelinks=new Array()
  imagelinks[0]="http://www.cruisecarinc.com"
  imagelinks[1]="http://www.solarhome.org"
  imagelinks[2]="http://www.nasa.gov"
  imagelinks[3]="http://www.eco-sphere.com"
  imagelinks[4]="http://www.masdarcity.ae"
  imagelinks[5]="http://www.myspace.com/freeenergymusic"
  imagelinks[6]="http://www.greenisuniversal.com"
  imagelinks[7]="http://www.teslamotors.com"
  imagelinks[8]="http://www.greenergadgets.com"
  imagelinks[9]="http://www.windenergy.nl"
  imagelinks[10]="http://www.cruisecarinc.com"


  var Logo=new Array()
  Logo[0]="http://newsphere.org/images/10.gif"
  Logo[1]="http://newsphere.org/images/1.gif"
  Logo[2]="http://newsphere.org/images/2.gif"
  Logo[3]="http://newsphere.org/images/3.gif"
  Logo[4]="http://newsphere.org/images/4.gif"
  Logo[5]="http://newsphere.org/images/5.gif"
  Logo[6]="http://newsphere.org/images/6.gif"
  Logo[7]="http://newsphere.org/images/7.gif"
  Logo[8]="http://newsphere.org/images/8.gif"
  Logo[9]="http://newsphere.org/images/9.gif"
  Logo[10]="http://newsphere.org/images/10.gif"

  var Logosmall=new Array()
  Logosmall[0]="http://newsphere.org/images/10_sm.gif"
  Logosmall[1]="http://newsphere.org/images/1_sm.gif"
  Logosmall[2]="http://newsphere.org/images/2_sm.gif"
  Logosmall[3]="http://newsphere.org/images/3_sm.gif"
  Logosmall[4]="http://newsphere.org/images/4_sm.gif"
  Logosmall[5]="http://newsphere.org/images/5_sm.gif"
  Logosmall[6]="http://newsphere.org/images/6_sm.gif"
  Logosmall[7]="http://newsphere.org/images/7_sm.gif"
  Logosmall[8]="http://newsphere.org/images/8_sm.gif"
  Logosmall[9]="http://newsphere.org/images/9_sm.gif"
  Logosmall[10]="http://newsphere.org/images/10_sm.gif"

var preload=new Array()

for (n=0;n<Pic.length;n++)
{
	preload[n]=new Image()
	preload[n].src=Pic[n]
}

  var ry=Math.floor(Math.random()*Pic.length)

  if (ry==0)
     ry=1



document.write('<img name="defaultimage" src="'+Pic[ry]+'" width=100% height=100%></div><div id="sec4" class="transparent2" onMouseout="hideSec(4);"><p id="thelink"><a href="'+imagelinks[ry]+'" id="linki" target="_blank"><img name="imagelogo" src="'+Logo[ry]+'" border=0></a></p></div><div class="transparent3" id="footer" style="background-image: url(http://newsphere.org/images/fade.gif)"; ><div id="cred1">&nbsp&copy; NewSphere 2011</div><div class="transparent2" id="f1"><a href="#" onMouseOver="showSec(5);");"><img src="http://newsphere.org/images/ad_sm.gif" border=0></a></div><div class="transparent2" id="f1"><a href="#" onMouseOver="showSec(4);");"><img name="logosm" src="'+Logosmall[ry]+'" border=0></a></div></div><div id="sec5" class="transparent2" onMouseout="hideSec(5);"><a href="http://newsphere.org/advertise/"><img src="http://newsphere.org/images/ad.gif" border=0></a></div>')






function rotateimage()
{

if (curindex==(tempindex=Math.floor(Math.random()*(Pic.length)))){
curindex=curindex==0? 1 : curindex-1
}
else
curindex=tempindex

	document.images.defaultimage.src=Pic[curindex]
	document.images.imagelogo.src=Logo[curindex]
	document.images.logosm.src=Logosmall[curindex]
	document.getElementById("linki").href = imagelinks[curindex]  
}



setInterval("rotateimage()",delay)








//the next 3 lines are browser detection for user-agent DOMS
ns4 = (document.layers) ? true:false //required for Functions to work
ie4 = (document.all) ? true:false //required for Functions to work
ng5 = (document.getElementById) ? true:false //required for Functions to work

function hideSec() 


{

if (ng5) document.getElementById('sec1').style.visibility = "hidden"
else if (ns4) document.sec1.visibility = "hide"
else if (ie4) sec1.style.visibility ="hidden"



if (ng5) document.getElementById('sec4').style.visibility = "hidden"
else if (ns4) document.sec4.visibility = "hide"
else if (ie4) sec4.style.visibility ="hidden"

if (ng5) document.getElementById('sec5').style.visibility = "hidden"
else if (ns4) document.sec5.visibility = "hide"
else if (ie4) sec5.style.visibility ="hidden"
}





function showSec(n) {
hideSec();
if (ng5) document.getElementById('sec' + n).style.visibility = "visible";
else if (ns4) document.layers["sec" + n].visibility = "show";
else if (ie4) document.all["sec" + n].style.visibility = "visible";
}

function showAllSec(n) {
if (ng5) document.getElementById('sec' + n).style.visibility = "visible";
else if (ns4) document.layers["sec" + n].visibility = "show";
else if (ie4) document.all["sec" + n].style.visibility = "visible";
}





//  End -->

