$(document).ready(function(){}); 

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));
		}
	}
return "";
}
  
function en_di_checkbox() {
	if (document.frmUpload.is_new.checked != 0)  {
		document.frmUpload.new_diag_en.disabled=0;
		document.frmUpload.new_diag_gr.disabled=0;
		document.frmUpload.diagnoses.disabled=1;
	} else {
		document.frmUpload.new_diag_en.disabled=1;
		document.frmUpload.new_diag_gr.disabled=1;
		document.frmUpload.diagnoses.disabled=0;
	}
} 
	
function next_foto() {
	var cur_foto = getCookie('curent_photo');
	var value = parseInt(cur_foto) + 1;
	setCookie('curent_photo', value, 10, '/');		
}
	
function prev_foto() {
	var cur_foto = getCookie('curent_photo');
	var value = parseInt(cur_foto) - 1;
	setCookie('curent_photo', value, 10, '/');		
}
	
function setCurentFoto(pos) {
	setCookie("curent_photo", pos, 10, '/' );		
}

function setUrlParams ( ids, index ) {
	var data = ids.split("|");
	if ( index == 1 ) top.location.href = ""+data[0]+"/";
	else top.location.href = ""+data[1]+"/"+data[0]+"/";
}
