function p_open(p_url) {
var win = window.open(p_url, "p_win");
win.focus();
}
function takeYear(theDate) {
	x = theDate.getYear();
	var y = x % 100;
	y += (y < 38) ? 2000 : 1900;
	return y;
}
var today = new Date();
Year = takeYear(today);
function prepareSeal()
{
window.open('','srsSeal','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=630,height=350');
}

var MouseOverOK = ((navigator.appName == "Microsoft Internet Explorer") || (navigator.appName == "Netscape")) && parseInt(navigator.appVersion) >= 3;

var appletOK = (navigator.appName != "Netscape Navigator" || (parseFloat(navigator.appVersion) < 3.0 && parseFloat(navigator.appVersion) >= 3.03));

var loop_count;
loop_count=0;

function mouseover(imagename,reg_img_src,hl_img_src,width,height) {
   this.imagename=imagename;
   this.reg_img = new Image(width,height);
   this.reg_img.src = reg_img_src;
   this.hl_img = new Image(width,height);
   this.hl_img.src = hl_img_src;
}

if(MouseOverOK) {
   num_mouseovers = 9;

   mouseovers = new Array(num_mouseovers);
   mouseovers["web"] = new mouseover("b1","gfx/button1.gif","gfx/button1.gif",300,250);
   mouseovers["services"] = new mouseover("b2","gfx/button2.gif","gfx/button2.gif",305,344);
   mouseovers["portfolio"] = new mouseover("b3","gfx/button3.gif","gfx/button3.gif",305,344);
   mouseovers["contact"] = new mouseover("b4","gfx/button4.gif","gfx/button4.gif",305,344);
   mouseovers["services_bar"] = new mouseover("bar","gfx/main1.gif","gfx/services_bar1.gif",150,17);
   mouseovers["portfolio_bar"] = new mouseover("bar","gfx/main1.gif","gfx/portfolio_bar1.gif",150,17);
   mouseovers["contact_bar"] = new mouseover("bar","gfx/main1.gif","gfx/contact_bar1.gif",150,17);
   mouseovers["web_bar"] = new mouseover("bar","gfx/main1.gif","gfx/web_bar1.gif",150,17);
   mouseovers["support_bar"] = new mouseover("bar","gfx/main1.gif","gfx/main1.gif",150,17);

}

function set_reg(imagename) {
   if(MouseOverOK) {
      document.images[mouseovers[imagename].imagename].src = mouseovers[imagename].reg_img.src;
   }
}

function set_hl(imagename) {
   if(MouseOverOK) {
      document.images[mouseovers[imagename].imagename].src = mouseovers[imagename].hl_img.src;
   }
}
var all_divs = new Array('div1','div2','div3','div4','div5','div6');
function hideshowdiv(diver){
	var divlayer = document.getElementById(diver);
	for (x = 0;x < 6;x++) {
		if (all_divs[x] != diver) {
			document.getElementById(all_divs[x]).style.display = 'none'; 
		}
		else {
			if(divlayer.style.display == 'inline'){
				divlayer.style.display = 'none';
			}else{
				divlayer.style.display = 'inline';
			}
		}
	}
}

function flip_screen(){
   // loop_count++;
   // run only 1 times
   // if (loop_count<2) {
   setTimeout("set_hl('web');set_hl('web_bar');hideshowdiv('div2');",5000); // 5 sec.
   setTimeout("set_reg('web');set_hl('services');set_hl('services_bar');hideshowdiv('div3');",10000); // 10 sec
   setTimeout("set_reg('services');set_hl('portfolio');set_hl('portfolio_bar');hideshowdiv('div4');",15000);
   setTimeout("set_reg('portfolio');set_hl('contact');set_hl('contact_bar');hideshowdiv('div5');",20000);
   setTimeout("set_reg('contact');set_reg('contact_bar');hideshowdiv('div1');",25000);
   // setTimeout("flip_screen()",120000);  //120000  // 2 minutes
   // }
}
