//float windows
function FloatWin(winname,src,w,h,alt){
	this._img_src = src;
	this._img_url = "";
	this._img_w = w;
	this._img_h = h;
	this._img_alt = ""+alt;

	//document.write('<div id=one style="Z-INDEX: 1; WIDTH: '+_img_w+'px; POSITION: absolute; HEIGHT: '+_img_h+'px"> <a href="'+_img_url+'"><img src="'+_img_src+'" width="'+_img_w+'" height="'+_img_h+'" border="0" alt="'+_img_alt+'" onMouseOver="pause_resume();" onMouseOut="pause_resume();"></a></div> ');		
	document.write('<div id="'+winname+'" style="Z-INDEX: 1000000; WIDTH: '+this._img_w+'px; POSITION: absolute; HEIGHT: '+this._img_h+'px">');
	document.write('<iframe style="position:absolute;z-index:-1;width:100%;height:100%;top:0;left:0;scrolling:no;" frameborder="0" src="./fw.htm"></iframe>');
	document.write('<img src="'+this._img_src+'" width="'+this._img_w+'" height="'+this._img_h+'" border="0" usemap="#Map" alt="'+this._img_alt+'" onMouseOver=pause_resume("'+winname+'"); onMouseOut=pause_resume("'+winname+'");>');
	document.write('<map name="Map">');
    document.write('<area shape="rect" coords="27,34,154,52" href="./newinfo.htm" target="_blank">');
    document.write('<area shape="rect" coords="27,54,127,70" href="./distinguish.htm" target="_blank">');
    document.write('<area shape="rect" coords="27,73,156,89" href="http://58.64.141.103:8000/ezytech" target="_blank">');
    document.write('</map>');
	document.write('</div>');
	this.xPos = Math.round(Math.random()*1000); 
	this.yPos = Math.round(Math.random()*1000); 
	this.step = 1; 
	this.delay = 20; 
	this.width = 0;
	this.height = 0; 
	this.Hoffset = 0; 
	this.Woffset = 0; 
	this.yon = 0; 
	this.xon = 0; 
	this.pause = true; 
	this.interval=null; 
	this.float_window=eval("document.getElementById('"+winname+"')");
	if(this.float_window){
		this.float_window.style.top = this.yPos; 
	}
	this.start_float=function(){ 
		this.float_window.visibility = "visible"; 
		this.interval = setInterval("_changePos('"+winname+"')", this.delay); 
	}; 	
}
function _changePos(fw){ 
	if(fw==null){
		return;
	}
	var fw=eval("this."+fw);
	fw.width = document.body.clientWidth; 
	fw.height = document.body.clientHeight; 
	fw.Hoffset = fw.float_window.offsetHeight; 
	fw.Woffset = fw.float_window.offsetWidth; 
	fw.float_window.style.left = fw.xPos + document.body.scrollLeft; 
	fw.float_window.style.top = fw.yPos + document.body.scrollTop; 
	if (fw.yon) { 
		fw.yPos = fw.yPos + fw.step; 		
	}else { 
		fw.yPos = fw.yPos - fw.step; 
	} 
	if (fw.yPos < 0) { 
		fw.yon = 1; 
		fw.yPos = 0; 
	} 
	if (fw.yPos >= (fw.height - fw.Hoffset)) { 
		fw.yon = 0; 
		fw.yPos = (fw.height - fw.Hoffset); 
	} 
	if (fw.xon) { 
		fw.xPos = fw.xPos + fw.step; 
	}else { 
		fw.xPos = fw.xPos - fw.step; 
	} 
	if (fw.xPos < 0) { 
		fw.xon = 1; 
		fw.xPos = 0; 
	} 
	if (fw.xPos >= (fw.width - fw.Woffset)) { 
		fw.xon = 0; 
		fw.xPos = (fw.width - fw.Woffset); 
	} 
} 
function pause_resume(fw) { 
	if(fw==null){
		return;
	}
	var myfw=eval("this."+fw);
	if(myfw.pause) {
		clearInterval(myfw.interval);
		myfw.pause = false;
	}else {
		myfw.interval = setInterval("_changePos('"+fw+"')",myfw.delay);
		myfw.pause = true;
	} 
} 


/*
var a=new FloatWin("a","./images/newinfo.gif","javascript:newinfo();",158,89,"");
a.start_float();
var b=new FloatWin("b","./images/Osprey_distinguish.gif","javascript:validate();",158,89,"");
b.start_float();
var c=new FloatWin("c","./images/Osprey_distinguish_01.gif","javascript:distinguish();",158,89,"");
c.start_float();

function openWindow(theURL) {
  window.open(theURL,'','');
}
function validate(){
	openWindow('http://58.64.141.103:8000/ezytech/');
}
function distinguish(){
	openWindow('./distinguish.htm');
}
function newinfo(){
	openWindow('./newinfo.htm');
}
*/