function GetWidth()
{
var x = 0;
if (self.innerHeight)
{
x = self.innerWidth;
}
else if (document.documentElement && document.documentElement.clientHeight)
{
x = document.documentElement.clientWidth;
}
else if (document.body)
{
x = document.body.clientWidth;
}
return x;
}
function photoinfo (event, name, date, wh, desc, size)
{
x=event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft+20;
y=event.clientY + document.body.scrollTop + document.documentElement.scrollTop-80;
document.getElementById('photoinfo').style.display='block';
if (wh!='')
{
echowh='Rozmery: '+wh+'
';
}
else
{
echowh='';
}
document.getElementById('photoinfo').innerHTML='Nadpis média: '+name+'
'+echowh+'Dátum pridania: '+date+'
Velkost: '+size;
if (desc!='')
{
document.getElementById('photoinfo').innerHTML+='
Popis média: '+desc;
}
document.getElementById('photoinfo').style.top=y+'px';
document.getElementById('photoinfo').style.left=x+'px';
document.getElementById('photoinfo').onmousemove="photoinfo (event, '"+name+"', '"+date+"', '"+wh+"', '"+desc+"', '"+size+"');";
document.getElementById('photoinfo').onmouseover="photoinfo (event, '"+name+"', '"+date+"', '"+wh+"', '"+desc+"', '"+size+"');";
//alert(document.getElementById('photoinfo').onmousemove);
}
function replace_html(el, html) {
if( el ) {
var oldEl = (typeof el === "string" ? document.getElementById(el) : el);
var newEl = document.createElement(oldEl.nodeName);
newEl.id = oldEl.id;
newEl.className = oldEl.className;
newEl.innerHTML = html;
if(oldEl.parentNode)
oldEl.parentNode.replaceChild(newEl, oldEl);
else
oldEl.innerHTML = html;
return newEl;
}
};
var actualimg;
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=")
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
else
{
return null;
}
}
function showimage (i)
{
actualimg=i;
//if(getCookie('info')==undefined)
// {
// alert('Fotky, zvuky a videá môžete posúvať aj pomocou šípiek na klávesnici.');
// function Set_Cookie( name, value, expires, path, domain, secure )
// {
// var today = new Date();
// today.setTime( today.getTime() );
// if ( expires )
// {
// expires = expires * 1000 * 60 * 60 * 24;
// }
// var expires_date = new Date( today.getTime() + (expires) );
// document.cookie = name + "=" +escape( value ) +
// ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
// ( ( path ) ? ";path=" + path : "" ) +
// ( ( domain ) ? ";domain=" + domain : "" ) +
// ( ( secure ) ? ";secure" : "" );
// }
// Set_Cookie('info', 1);
// }
if (max>1)
{
upi=i+1;
downi=i-1;
if ((i-1)<0)
{
downi=max-1;
}
if ((i+1)>max-1)
{
upi=0;
}
ar="
";
}
else
{
upi=i;
ar="";
}
if (down==1)
{
downphoto='Stiahnuť original';
}
else
{
downphoto='';
}
array[i]['width']=Number(array[i]['width']);
if (array[i]['type']=='video')
{
document.getElementById('galleryimg').innerHTML='
Nadpis média: '+array[i]['name']+' Dátum pridania: '+array[i]['date']+' Velkost: '+array[i]['size']+' | '+(i+1)+'/'+max+' '+downphoto+' |
Nadpis média: '+array[i]['name']+' Dátum pridania: '+array[i]['date']+' Velkost: '+array[i]['size']+' | '+(i+1)+'/'+max+' '+downphoto+' |
Nadpis média: '+array[i]['name']+' Rozmery: '+array[i]['wh']+' Dátum pridania: '+array[i]['date']+' Velkost: '+array[i]['size']+' | '+(i+1)+'/'+max+' '+downphoto+' |