var win = null;

function CenterWindow(mypage,w,h,myname){
    var bgcolor="#FFFFFF";
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    h=h+20;
    w=w+20;
    var settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,menu=no,resizable=no';
    win = window.open('photo.php?id='+mypage+'&w='+w+'&h='+h, null, settings);

/*    win = window.open("picture.htm","newWindow","width="+w+",height="+h+",left="+LeftPosition+",top="+TopPosition);
    win.document.open();
    win.document.write('<html><title>'+myname+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');  
    win.document.write('<table width='+w+' border="0" cellspacing="0" cellpadding="0" align="center" height='+h+'><tr><td>');
    win.document.write('<img src="http://213.35.214.54'+mypage+'" width='+w+' height='+h+'>'); 
    win.document.write('</td></tr></table></body></html>');
    win.document.close();
    win.focus();*/
}

function addone(kogus){
    if (!isNaN(kogus.value)) kogus.value++;	
    else kogus.value=1; 
    kogus.select();
/*    return false;*/
}

function minusone(kogus){
    if (!isNaN(kogus.value) && kogus.value>1) kogus.value--;
    else kogus.value='0'; 
    kogus.select();
    return false;
}



