home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 October
/
Chip_2003-10_cd2.bin
/
prezentace
/
yamamusic
/
kontakty_soubory
/
admin.js
next >
Wrap
Text File
|
2003-07-24
|
5KB
|
199 lines
<!--
var highcolor = '#d4eef1';
var lowcolor = '#8EBDC2';
var selectedcolor = '#FF9595';
var root_path = document.cookie;
var enter = true;
root_path = root_path.substring(root_path.indexOf('root_path'));
root_path = '/'+root_path.substring(13,root_path.indexOf(';')+1);
if(root_path == '/ ')
// alert('>'+root_path+'<');
root_path = '';
function kytara_click(id)
{
x = 200;y=50;
var maxX = screen.availWidth;
var maxY = screen.availHeight;
xpos = (maxX/2) - (x/2); ypos = (maxY/2) - (y/2) ;
var kytara_big = window.open('kytara_big.html?id='+id.src,'kytara_big','top='+ypos+',left='+xpos+'toolbar=no,location=no,status=no,menubar=no,scroolbars=no,resizeable=no,width='+x+',height='+y,true);
kytara_big.focus();
}
function menu(id,mode,pic)
{
if(id.id == 'index')
{
if(mode)
{
id.style.background = '#FFFFFF';
id.style.color = 'black';
}
if(!mode)
{
id.style.background = 'Rgb(216,216,216)';
id.style.color = '#2B565B';
}
}
else
{
if(mode)
{
document.getElementById('imgmenu_'+pic).src = root_path+'/images/menu_roh_on.gif';
id.style.background = '#2B565B';
id.style.color = 'white';
}
if(!mode)
{
document.getElementById('imgmenu_'+pic).src = root_path+'/images/menu_roh_off.gif';
id.style.background = '#E8E8E8';
id.style.color = 'black';
}
}
}
// zmena barev v objektu
function changeline(id,mode,selected)
{
if(mode)
{
// id.style.cursor = 'pointer'
id.style.background = highcolor;
}
if(!mode)
{
// id.style.cursor = 'default'
if(!selected)
id.style.background = lowcolor;
else
id.style.background = selectedcolor;
}
}
function acceptmenu()
{
if(!enter) return;
if(document.menuconf.id.value == '')
{
alert('Pro editaci zßznamu musφte nap°ed vybrat po₧adovanou polo₧ku !!');
return;
}
if(location.href.indexOf('newsconf.php') != -1)
{
document.menuconf.text.value = document.all('novinka').innerHTML;
var d = document.menuconf.datum.value;
var date = d.split('.');
if (date.length != 3)
{
alert('èptan∞ zadanΘ datum !!');
document.menuconf.datum.value = '';
return;
}
document.menuconf.datum.value = date[2]+'-'+date[1]+'-'+date[0];
}
document.menuconf.action.value='acceptrecord';
if(enter) document.menuconf.submit();
}
function menuclick(href,id)
{
// alert(top.document.frames["main"].document.location.href);
top.document.frames["main"].document.location.href = href+'?edit='+id;
// document.location.href = href+'?edit='+id;
}
function addmenu()
{
if(location.href.indexOf('newsconf.php') != -1)
{
document.menuconf.text.value = document.all('novinka').innerHTML;
var d = document.menuconf.datum.value;
var date = d.split('.');
if (date.length != 3)
{
alert('èptan∞ zadanΘ datum !!');
document.menuconf.datum.value = '';
return;
}
document.menuconf.datum.value = date[2]+'-'+date[1]+'-'+date[0];
}
document.menuconf.action.value='addrecord';
document.menuconf.submit();
}
function delmenu()
{
if(document.menuconf.id.value != '')
{
document.menuconf.action.value='delrecord';
document.getElementById('line_'+document.menuconf.line.value).style.background = highcolor;
if(confirm('Opravdu chcete smazat zßznam??') && enter)
document.menuconf.submit();
document.getElementById('line_'+document.menuconf.line.value).style.background = lowcolor;
}
}
function delnews()
{
if(document.menuconf.id.value != '')
{
document.menuconf.action.value='delrecord';
d = document.frames("fmenu")
// alert(top.main.document.menuconf.line.value);
// d.document.getElementById('line_'+top.main.document.menuconf.line.value).style.background = highcolor;
if(confirm('Opravdu chcete smazat zßznam??'))
document.menuconf.submit();
// d.document.getElementById('line_'+document.menuconf.line.value).style.background = lowcolor;
}
}
// prepinani stavu tlacitek
function switch_button(id, status)
{
var txtSrc='';
switch(status)
{
// Prepni do ON stavu!!
case true:
if(id.src.indexOf('_on')!=-1)
break;
txtSrc = id.src.substring(0,id.src.lastIndexOf('_'));
if(txtSrc != '')
id.src = txtSrc+'_on.gif'; // zapnuty stav tlacitka
break;
// Prepni do OFF stavu
case false:
if(id.src.indexOf('_off')!=-1)
break;
txtSrc = id.src.substring(0,id.src.lastIndexOf('_'));
if(txtSrc != '')
id.src = txtSrc+'_off.gif'; // Vypnuti tlacitka
break;
default:
if(id.src.indexOf('_on')!=-1)
break;
txtSrc = id.src.substring(0,id.src.lastIndexOf('_'));
if(txtSrc != '')
id.src = txtSrc+'.gif'; // Vypnuti tlacitka
break;
}
}
// Provede EXECCOMMAND prikaz pro HTMLEditor
function command(id,strcommand,display,value)
{
document.execCommand(strcommand,display,value);
document.all('novinka').focus();
}
// Volano tagem A po klepnuti na sipecku v radku seznamu menu
function move(id,mode)
{
document.location.href = 'menuconf.php?move='+mode+'&id='+id;
}
//-->