home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 September
/
Chip_2001-09_cd1.bin
/
internet
/
ukazky
/
08xsoubory
/
fn_windows.js
< prev
next >
Wrap
Text File
|
2001-07-20
|
2KB
|
100 lines
function NewWindow(mypage, myname, w, h, scroll)
{
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
return win;
}
function NewWindowNR(mypage, myname, w, h, scroll)
{
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function win_image(width,height,title,path)
{
if (width < 800) w = width; else w = '800';
if (height < 600) h = height; else h = '600';
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
var scroll = '';
param = 'path='+path+'&title='+title;
if ((width >= 800) || (height >= 600)) scroll = 'yes'; else scroll = 'no';
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresizable'
//alert(winprops);
win = window.open('image.php?'+param, 'Image', winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function win_note()
{
var str = 'id_desc='+this.window.id_desc;
wnd = NewWindow('note_general.php?'+str, 'Note',510,330,'no');
wnd.creator = self;
}
function win_wap()
{
NewWindowNR("http://www.gelon.net/cgi-bin/wapalize.cgi?url=http://wap.cojeco.cz/index2.wml",'Gelon',200,436,'no');
}
function win_user()
{
NewWindowNR("https://redakce.cjc.cz/add_user_anon.php?plat=1&step=1",'AddUser',640,400,'yes');
}
function win_addbanner(id)
{
wnd = NewWindow("ad_addbannerscr.php?id_ad="+id,'AddBanner',510,200,'no');
wnd.creator = self;
}
function win_buyc(id)
{
wnd = NewWindow("ad_addbannerscr.php?buy=1&id_ad="+id,'AddBanner',510,200,'no');
wnd.creator = self;
}
function win_help(id)
{
NewWindowNR("help.php?faqn="+id,'Help',450,350,'yes');
}
function win_faqadd()
{
NewWindowNR("faq_add.php",'Thv',510,280,'no');
}
function win_konfer()
{
NewWindowNR("konfer.php",'Vhv',630,270,'no');
}
function MM_openBrWindow(theURL,winName,features)
{
window.open(theURL,winName,features);
}