picNum = 0;  
 pic1 = new Image();   
pic1.src = "images/banner-0.gif"; 
pic2 = new Image();   
 pic2.src = "images/banner-1.gif";  
//pic3 = new Image(); 
// pic3.src = "images/banner-2.gif";    

function replacePic(imgObjName) 
{
document.bannerad.src = eval(imgObjName + ".src");
}

function changePic()             
{               
   if (picNum ==0) 
      {
        replacePic('pic1');;   
        picNum++;
      }
   else if (picNum ==1) 
      {
        replacePic('pic2');;   
        picNum++;
      }
/*   else if (picNum ==2) 
      {
        replacePic('pic3');;   
        picNum++;
      }*/
   else 
      {
        replacePic('pic1');;   
        picNum = 0;
      }
               setTimeout("changePic();", 4000); 
           }		


function link() 
{
if (picNum == 0) 
{
loca=window.open("http://www.vizagcityonline.com");
//document.location.href="news1/welcome.html";
}

//if (picNum == 1) 
//{
//loca=window.open("http://www.vizagezine.com");
//document.location.href="news2/welcome.html";
//}

if (picNum == 2) 
{
loca=window.open("http://www.vizageshop.com");
//document.location.href="http:news3/welcome.html";
}
//if (picNum == 3) 
//{
//document.location.href="";
//}
}   


//code for floating ad

var Type = 'Z';
function StartFloat() {
if(document.all) {
	if (screen.width==800)
	{
	document.all.AdFloater.style.pixelLeft = document.body.clientWidth - 50;
	}
	else if (screen.width>800)
	{
	document.all.AdFloater.style.pixelLeft = document.body.clientWidth - document.all.AdFloater.offsetWidth;
	}
	document.all.AdFloater.style.visibility = 'visible';
	Type = 'A';
	}
else if(document.layers) {
	document.AdFloater.left = window.innerWidth - document.AdFloater.clip.width - 16;
	document.AdFloater.visibility = 'show';
	Type = 'B';
	}
else if(document.getElementById) {
	document.getElementById('AdFloater').style.left = (window.innerWidth - 35) + 'px';
	document.getElementById('AdFloater').style.visibility = 'visible';
	Type = 'C';
	}
if (document.all) { window.onscroll = Float; }
else { setInterval('Float()', 100); }
}
function Float() {
if (Type == 'A') { document.all.AdFloater.style.pixelTop = document.body.scrollTop; }
else if (Type == 'B') { document.AdFloater.top = window.pageYOffset; }
else if (Type == 'C') { document.getElementById('AdFloater').style.top = window.pageYOffset + 'px'; }
} //-->


document.write("<body topmargin='0' leftmargin='0' rightmargin='0' marginwidth='0' marginheight='0' onload='changePic()'>");

//if (screen.width==800)
//{
//document.write("<body topmargin='0' leftmargin='0' rightmargin='75' marginwidth='0' marginheight='0' onload='StartFloat();changePic()'>");
//}
//else if (screen.width>800)
//{
//document.write("<body topmargin='0' leftmargin='0' rightmargin='170' marginwidth='0' marginheight='0' onload='StartFloat();changePic()'>");
//}