<!--
function openoverviewcms(url,w,h){
   window.open (url,"contact","width="+w+",height="+h+",toolbars=yes,scrollbars=yes");
}

function checkAddUserForm(theForm){
  if (theForm.send_info.checked){
     if(theForm.email.value=="" ||  theForm.email.value.indexOf("@")<0 ){
         alert("Please enter a valid e-mail address");
         return(false);
     }
  }
  
  return(true);
}


    function checkPost(theForm){ 
  val = theForm.category.options[theForm.category.selectedIndex].value;
  if(val<=0){
    alert("Choose a category");
	return(false);
  }  
  if(theForm.subject.value==""){
	  alert("Subject field is mandatory");
	  return(false);
  }
  return(true);
}

function checkReplyForm(theForm){ 
  
  if(theForm.text.value==""){
	  alert("Text field is mandatory");
	  return(false);
  }
 
  if(theForm.subject.value==""){
	  alert("Subject field is mandatory");
	  return(false);
  }

  return(true);
  //checkPost
  //document.theForm.skola.options[document.theForm.skola.selectedIndex].value;
}

function checkPostForm(theForm){ 
  if(theForm.text.value==""){
	  alert("Text field is mandatory");
	  return(false);
  }
  
  val = theForm.category.options[theForm.category.selectedIndex].value;
  if(val<=0){
    alert("Choose a category");
	return(false);
  }  
  if(theForm.subject.value==""){
	  alert("Subject field is mandatory");
	  return(false);
  }

  return(true);
  //checkPost
  //document.theForm.skola.options[document.theForm.skola.selectedIndex].value;
}


function checkCalendarName(theForm, nochar){
 if(theForm.name.value==""){
  alert("Name field is mandatory");
  return(false);
 }
 if(theForm.name.value.length > nochar ){
  alert("Name field cannot be longer than " + nochar + " characters");
  return(false);
 } 
  return(true);
}

function checkSubject(theForm){
  if(theForm.subject.value==""){
	  alert("Subject field is mandatory");
	  return(false);
  }
  return(true);
}

function checkDocsForm(theForm){
  if(theForm.desc.value==""){
	  alert("Description field is mandatorye");
	  return(false);
  }
  return(true);
}

function returnDocs(tot_check){
	//alert("aaaaaaaaaa");
	//val = parseInt(eval("theForm.totboks"+i+".value"));
  tosend="";
  allDesc="";
  //alert("1 " + document.uploadDoc.check_1.checked);

  for(i=1; i<=tot_check; i++){
	  if( eval("document.uploadDoc.check_"+i+".checked")){
		  tosend = tosend + eval("uploadDoc.docid_"+i+".value")+",";
		  allDesc = allDesc + eval("uploadDoc.docdesc_"+i+".value")+ "<br>";
	  }	
  }	
  window.opener.document.getElementById('docStrList').innerHTML=allDesc
//  window.opener.document.pw.docListStr.value=allDesc;	
  window.opener.document.pw.docidStr.value=tosend;	
  window.self.close();
}



function returnDocsWithSysDocs(tot_docs, $tot_sysdocs){

  tosend="";
  allDesc="";
  
  for(i=1; i<=tot_docs; i++){
  //alert(":"+i+":");
	  if( eval("document.uploadDoc.check_"+i+".checked")){
		  tosend = tosend + eval("uploadDoc.docid_"+i+".value")+",";
		  allDesc = allDesc + eval("uploadDoc.docdesc_"+i+".value")+ "<br>";
	  }	
  }	
  
  
  tosendSysDocs="";
  allDescSysDocs="";
  sysDocsTable="";
  
  for(i=1; i<=$tot_sysdocs; i++){
 // alert(":"+i+":");
	  if( eval("document.uploadDoc.syscheck_"+i+".checked")){
		  tosendSysDocs = tosendSysDocs + eval("uploadDoc.sysdocid_"+i+".value")+",";
		  allDescSysDocs = allDescSysDocs + eval("uploadDoc.sysdocdesc_"+i+".value")+ "<br>";
      sysDocsTable = sysDocsTable + eval("uploadDoc.sysdoctable_"+i+".value")+",";
      //alert(tosendSysDocs);
	  }	
  }	
  
  window.opener.document.getElementById('docStrList').innerHTML=allDesc
  window.opener.document.pw.docidStr.value=tosend;	
  window.opener.document.getElementById('sysdocStrList').innerHTML=allDescSysDocs
  window.opener.document.pw.sysdocidStr.value=tosendSysDocs;	
  window.opener.document.pw.sysdoctable.value=sysDocsTable;	
    
  window.self.close();
}



function opendocs(){
  docsStr = document.pw.docidStr.value;
  page = "docs.php?docstr=" + docsStr;
  window.open (page ,"doc_handler","width=600,height=400,toolbars=yes,scrollbars=yes");
}

function sureAll(page, txt){
if (confirm(txt)) {
  window.location=page;  
}
}

function sure(page, what){
 txt_start = "Are you sure you want to delete";
 if (what=="country") {
  txt = txt_start  + " the country and all the companies and persons connected to it? ";
 }
 else if (what=="company") {
  txt = txt_start  + " the company and all persons connected to it? ";
 }
  else if (what=="titel") {
  txt = txt_start  + " the titel and all persons connected to it? ";
  } 
  else if (what=="person") {
  txt = txt_start  + " the person? ";
  }   
  else if (what=="headline") {
  txt = txt_start  + " the headline and all the pages related to it? ";
  }   
  else if (what=="page") {
  txt = txt_start  + " the page and all the data related to it? ";
  } 
  else if (what=="menu group") {
  txt = txt_start  + " the group and all the pages related to it? ";
  }   
  
 if (confirm(txt)){
  window.location = page;
 }
}

function confirmSubmit(txt)
{
var agree=confirm(txt);
if (agree)
	return true ;
else
	return false ;
}


function update() {
  window.opener.location.reload();
  window.self.close();
}

function openpop(url){
   window.open (url,"contact","width=750,height=500,toolbars=yes,scrollbars=yes");
}

function openoverview(url){
   window.open (url,"contact","width=300,height=400,toolbars=yes,scrollbars=yes");
}

function opensmall(url){
   window.open (url,"add","width=450,height=350,toolbars=yes,scrollbars=yes");
}

function openper(url){
   window.open (url,"per","width=300,height=150,toolbars=yes,scrollbars=no");
}

function openaddcal(url){
   window.open (url,"add_cal","width=650,height=470,toolbars=yes,scrollbars=yes");
}
function openEditAndReload(query){
   window.self.location = "common_space_admin.php?" + query;
   window.open ("../cmsfiles/edit.php?" + query,"add","width=450,height=350,toolbars=yes,scrollbars=yes");
}

//-->
