function confirmd(msg,url){
	if(msg=='')	msg='Are you sure?';
	if(url=='') url="\\";
	if(confirm(msg)) location = url;
}

var img = new Image();;

function get_image(src){
	img.src = src;
	img.onload=function () {
		document.fullimg.width=img.width;
		document.fullimg.height=img.height;
		document.fullimg.src=img.src;
	};
	return false;
}

function addInp(ix){if(ix>6)return 0;var e=document.getElementById('photos');e.innerHTML = e.innerHTML + '<input type="button" value="-" onClick="remInp('+(ix-1)+');"><br>\n<input type="file" name="foto'+ix+'">';e=document.getElementById('onemore');ix++;e.innerHTML = '<input type="button" value="+" onClick="addInp('+ix+');">';}function remInp(ix){var e=document.getElementById('photos');var s=e.innerHTML;var a=s.split('<br>');c=a.length;var o="";for(i=0;i<c;i++){if(a[i].indexOf('foto'+ix)==-1){o=o+a[i];if(i<c-1)o=o+'<br>';}}e.innerHTML = o;}
