function CheckFormEn() {
 if (document.frm.name.value.length == 0) {
     alert("Please enter your first and last name");
	 return (false);
 }
 if (document.frm.phone.value.length == 0) {
     alert("Please enter your phone number");
     return (false);
 }
 if (document.frm.email.value == 0) {
     alert("Please enter email address");
     return (false);
 }
 if (document.frm.cv.value.length < 6) {
     alert("Please attach your CV");
     return (false);
 }
}

function CheckFormBg() {
 if (document.frm.name.value.length == 0) {
     alert("Моля въведете вашето име и фамилия");
	 return (false);
 }
 if (document.frm.phone.value.length == 0) {
     alert("Моля въведете вашят телефонен номер");
     return (false);
 }
 if (document.frm.email.value == 0) {
     alert("Моля въведете вашият email адрес");
     return (false);
 }
 if (document.frm.cv.value.length < 6) {
     alert("Моля прикачете вашата автобиография");
     return (false);
 }
}

function OpenGallery(gid) {
	w = 780;
	h = 700;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no ,resizable=no';
	ss = window.open('inc/gallerys.php?gallery='+gid,'image',settings);
}

function printmeWindow(cat, pid) {
	w = 600;
	h = 700;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes ,resizable=no';
	ss = window.open('print.php?cat='+cat+'&p='+pid,'image',settings);
}

function printmeMainWindow(url) {
	w = 600;
	h = 700;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes ,resizable=no';
	ss = window.open('printmain.php?m='+url,'image',settings);
}