(top.location == self.location) || (top.location = self.location)

function imgchange(obj, src){
    obj.src = src;
}

function czatWindow(url) {
        var win = ''; 
        win = window.open(url,"czatWindow",'resizable=1,scrollbars=auto,menubar=no' );
}

function popup(url, width, height) {
        var win = ''; 
        win = window.open(url,"popup",'width=' + width + ',height=' + height + 'resizable=1,scrollbars=yes,menubar=no' );
	win.focus();
}

function maxlength( field, countfield, maxlimit ){
    if ( field.value.length > maxlimit ){
	field.value = field.value.substring( 0, maxlimit );
	alert( 'Przekroczona maksymalna dozwolona ilość znaków (' + maxlimit + ')' );
	return false;
    }
    else{
	countfield.value = maxlimit - field.value.length;
    }
}

function setF(form, id, value){
    var obj = eval("window.opener.document.forms["+form+"]."+id);    
    obj.value =  value;
    window.close();
    return true;
}


//Generic Drag Script-  Dynamic Drive (www.dynamicdrive.com)
//For full source code and terms of usage,
//visit http://www.dynamicdrive.com
/*
var ie=document.all
var ns6=document.getElementById&&!document.all

var dragapproved=false
var z,x,y

function move(e){
if (dragapproved){
z.style.left=ns6? temp1+e.clientX-x: temp1+event.clientX-x
z.style.top=ns6? temp2+e.clientY-y : temp2+event.clientY-y
return false
}
}

function drags(e){
if (!ie&&!ns6)
return
var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "HTML" : "BODY"

while (firedobj.tagName!=topelement&&firedobj.className!="drag"){
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}

if (firedobj.className=="drag"){
dragapproved=true
z=firedobj
temp1=parseInt(z.style.left+0)
temp2=parseInt(z.style.top+0)
x=ns6? e.clientX: event.clientX
y=ns6? e.clientY: event.clientY
document.onmousemove=move
return false
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")

*/

var c = 0;
function play(){
    document.cam.src = "cam/cam.php?"+c;
    c = c + 1;
    setTimeout("play()",60000);
}

