//(c) Artur Stempień virtualmedia.pl
function MM_swapImgRestore() { 
 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
} 
function PopupPic(sPicURL) { 
 window.open( "popup.htm?"+sPicURL, "", 
 "resizable=1,HEIGHT=200,WIDTH=200"); 
} 

function MM_preloadImages() { 
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
 if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { 
 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function loadpagesimpler(url,id) {
var iRnd = Math.random();
url=url+"&rand="+iRnd;
 
 if (document.getElementById) {
 var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
}
if (x) {
x.onreadystatechange = function() {
 if (x.readyState == 4 && x.status == 200) {
 el = document.getElementById(id);
el.innerHTML = x.responseText;
}
}
x.open("GET", url, true);
x.send(null);
}
}
function flip(rid)
{
current=(document.getElementById(rid).style.display == 'none') ? 'block' : 'none';
document.getElementById(rid).style.display = current;
}
function videodelete(id,numero) {
window.document.clientpanel.elements["prvideos"+numero].value=0;
window.document.getElementById("prvideo"+numero).style.display='none';
window.document.clientpanel.elements["videoacceptg"+numero].value=0;
window.document.clientpanel.ilevideo.value--;
var pare = document;
if (pare.getElementById) {
 var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
}
if (x) {
 x.onreadystatechange = function() {
 if (x.readyState == 4 && x.status == 200) {
 el = pare.getElementById(id);
el.innerHTML = x.responseText;
}
}
var iRnd = Math.random(); 
 
 x.open("GET", "clearvideo.php?pro="+numero+'&rand='+iRnd, true);
x.send(null);
}
}