home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 January
/
Chip_2004-01_cd1.bin
/
chplus
/
navrcholu
/
navrcholu_soubory
/
nv_global.js
< prev
next >
Wrap
Text File
|
2003-11-25
|
2KB
|
72 lines
var nv_mn_show_timeout=100;
var nv_mn_hide_timeout=300;
var nv_mn_active=0;
var nv_mn_timeout;
function get_element(name){
if(document.all){
return document.all[name];
}else{
return document.getElementById(name);
}
}
function nv_mn_parse_id(id){
var out=Array();
var pattern=/-(\w+-\d+-\d+)$/;
var result;
if((result=pattern.exec(id))!=null){
return result[1];
}else{
return false;
}
}
function nv_mn_unregister(id){
if(nv_mn_active){
var element=get_element("mn-d-"+nv_mn_active);
if(element){
element.style.display="none";
}
var de_element=get_element("mn-de-"+nv_mn_active);
if(de_element.className!=""){
de_element.className="";
}
nv_mn_active=0;
}
}
function nv_mn_register(id){
nv_mn_active=nv_mn_parse_id(id);
var element=get_element("mn-d-"+nv_mn_active);
if(element){
element.className="on";
element.style.display="block";
}
var de_element=get_element("mn-de-"+nv_mn_active);
if(de_element.className!="on"){
de_element.className="on";
}
}
function nv_mn_ov(self){
if(nv_mn_timeout){
clearTimeout(nv_mn_timeout);
}
nv_mn_timeout=setTimeout("nv_mn_unregister(\""+self.id+"\"); nv_mn_register(\""+self.id+"\");",nv_mn_show_timeout);
}
function nv_mn_ou(self){
if(nv_mn_timeout){
clearTimeout(nv_mn_timeout);
}
nv_mn_timeout=setTimeout("nv_mn_unregister(\""+self.id+"\");",nv_mn_hide_timeout);
}
function nv_ow(path,name,width,height){
var left=Math.floor((screen.width-width)/2)
var top=Math.floor((screen.height-height)/2)
var newwindow=window.open(path,name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+width+',height='+height+',top='+top+',left='+left);
return(typeof(newwindow)=="object")?true:false;
}
function nv_ow_help(path){
return !nv_ow(path,"nv_help",500,300);
}
function nv_ow_hc(path){
return !nv_ow(path,"nv_htmlcode",500,300);
}