function popUp() {
  win = window.open( "rostiegroup.aspx", "popUp", 'width=700, height=350, screenX=0, screenY=0, left=50, top=50, status=no, menubar=no, location=no, scrollbars=yes, directories=no, resizable=no' );
  win.focus();
}

function popUpPrivacy() {
  win = window.open( "privacyPolicy.aspx", "popUp", 'width=700, height=300, screenX=0, screenY=0, left=50, top=50, status=no, menubar=no, location=no, scrollbars=yes, directories=no, resizable=no' );
  win.focus();
}

function popUpCP24() {
  win = window.open( "pressRelMar2007.aspx", "popUp", 'width=370, height=360, screenX=0, screenY=0, left=50, top=50, status=no, menubar=no, location=no, scrollbars=yes, directories=no, resizable=no' );
  win.focus();
}
function popUpCP242() {
  win = window.open( "pressRelDec2007.aspx", "popUp", 'width=370, height=360, screenX=0, screenY=0, left=50, top=50, status=no, menubar=no, location=no, scrollbars=yes, directories=no, resizable=no' );
  win.focus();
}
function popUpPDF() {
  win = window.open( "RTRHDMay2007.pdf", "popUp", 'width=800, height=600, screenX=0, screenY=0, left=50, top=50, status=no, menubar=no, location=no, scrollbars=yes, directories=no, resizable=no' );
  win.focus();
}
function popUpLVR() {
  win = window.open( "LVR.doc", "popUp", 'width=800, height=600, screenX=0, screenY=0, left=50, top=50, status=no, menubar=no, location=no, scrollbars=yes, directories=no, resizable=no' );
  win.focus();
}
function popUpOBCCAN() {
  win = window.open( "OBCCANMay2008.doc", "popUp", 'width=800, height=600, screenX=0, screenY=0, left=50, top=50, status=no, menubar=no, location=no, scrollbars=yes, directories=no, resizable=no' );
  win.focus();
}
function showServices() {
  var runTime = new Date();
  var seconds = runTime.getSeconds();

  if     ( seconds >= 0 && seconds <=  5 ) picNo = "services1_2";
  else if( seconds >  5 && seconds <= 10 ) picNo = "services3_4";
  else if( seconds > 10 && seconds <= 15 ) picNo = "services5_6";
  else if( seconds > 15 && seconds <= 20 ) picNo = "services1_2";
  else if( seconds > 20 && seconds <= 25 ) picNo = "services3_4";
  else if( seconds > 25 && seconds <= 30 ) picNo = "services5_6";
  else if( seconds > 30 && seconds <= 35 ) picNo = "services1_2";
  else if( seconds > 35 && seconds <= 40 ) picNo = "services3_4";
  else if( seconds > 40 && seconds <= 45 ) picNo = "services5_6";
  else if( seconds > 45 && seconds <= 50 ) picNo = "services1_2";
  else if( seconds > 50 && seconds <= 55 ) picNo = "services3_4";  
  else if( seconds > 55 && seconds <= 60 ) picNo = "services5_6";    
  
  document.getElementById( "services1_2" ).style.display = "none";
  document.getElementById( "services3_4" ).style.display = "none";
  document.getElementById( "services5_6" ).style.display = "none";
  document.getElementById( picNo ).style.display = "block";	
}

var picNo = 0;

function changeTopPic() {
	
  var runTime = new Date();
  var seconds = runTime.getSeconds();

  if     ( seconds >  0 && seconds <=  5 ) picNo = 0;
  else if( seconds >  5 && seconds <= 10 ) picNo = 1;
  else if( seconds > 10 && seconds <= 15 ) picNo = 2;
  else if( seconds > 15 && seconds <= 20 ) picNo = 3;
  else if( seconds > 20 && seconds <= 25 ) picNo = 4;
  else if( seconds > 25 && seconds <= 30 ) picNo = 5;
  else if( seconds > 30 && seconds <= 35 ) picNo = 0;
  else if( seconds > 35 && seconds <= 40 ) picNo = 1;
  else if( seconds > 40 && seconds <= 45 ) picNo = 2;
  else if( seconds > 45 && seconds <= 50 ) picNo = 3;
  else if( seconds > 50 && seconds <= 55 ) picNo = 4;  
  else if( seconds > 55 && seconds <= 60 ) picNo = 5;    
}

function enlargeIMG( picNo ) {  
  var source, name, params;

  name   =  "enlarge_pic";
  params =  "width=486, height=280, screenX=0, screenY=0, left=25, top=25, menubar=no, location=no, scrollbars=no, directories=no, resizable=no";

  source = "<html>" +
             "<head>" +
			   "<title>RostieGeeks</title>" +
               "<link href='stysheet.css' rel='stylesheet' type='text/css' />" +
			   "<script type='text/javascript' src='javascript/javascript.js'></script>" +
             "</head>" +
             "<body style='margin:0px; padding:0px;' onLoad='preloadImages();'>" +	    
               "<table style='border-width:0px; padding:0px; background-image:url(images/pop_up_bg.jpg); background-repeat:no-repeat; width:486px; height:280px;' cellspacing='0'>" +
	             "<tr>" +
	               "<td style='vertical-align:top; text-align:left; padding-top:19px; padding-left:3px;'><img src='pictures/" + picNo + ".jpg'" + "style='width:472px; height:235px; margin-left:4px;' id='enlargedPic' /></td>" +
                 "</tr>" +
				 "<tr>" + 
				   "<td style='vertical-align:bottom; text-align:center; padding-bottom:3px;'>" + 
				     "<a href='javascript:window.close();' onmouseover=\"changeImages('closeWinBt', 'images/pop_up_close_win_ro.gif'); return true;\" onmouseout=\"changeImages('closeWinBt', 'images/pop_up_close_win.gif'); return true;\">" +
					   "<img name='closeWinBt' src='images/pop_up_close_win.gif' style='border-width:0px;' />" +
					 "</a>" +
				   "</td>" +
				 "</tr>" + 
	           "</table>" +	
             "</body>" +
           "</html>";		  
		   
  this_window = window.open( "", name, params );		   
  this_window.document.write( source );
  this_window.focus();
  this_window.document.close();
  this_window = null;
}

function swapImage() {
  document.images[ "closeWin" ].src = "images/popup_close_window_ro.jpg";
}
function swapBack() {
  document.images[ "closeWin" ].src = "images/popup_close_window.jpg";
}

function showLayer( layerName ) {
  document.getElementById( 'servicesIntro' ).style.display = "none";
  document.getElementById( 'installation' ).style.display = "none";
  document.getElementById( 'training' ).style.display = "none";
  document.getElementById( 'troubleshooting' ).style.display = "none";
  document.getElementById( 'Internet' ).style.display = "none";
  document.getElementById( 'security' ).style.display = "none"; 
  document.getElementById( 'virus' ).style.display = "none"; 
  
  document.getElementById( layerName ).style.display = "block";
}


//mouse rollover functions for button navigation - navButtons.asp
function newImage(arg) {
	if(document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		homeBt_over      = newImage("images/home_ro.jpg");
		companyBt_over   = newImage("images/company_ro.jpg");
		servicesBt_over  = newImage("images/services_ro.jpg");
		bookAtechBt_over = newImage("images/bookAtech_ro.jpg");
		payonlineBt_over = newImage("images/payonline_ro.jpg");
		contactBt_over   = newImage("images/contact_ro.jpg");
		closeWinBt_over  = newImage("images/pop_up_close_win_ro.jpg");
		preloadFlag      = true;
	}
}
//end of mouse rollover functions