function nascondi() {
 if (document.all) {
   document.all["jump"].style.visibility="visible";
 } else if (document.layers){
   document.layers["jump"].visibility="show";
 } else if (document.getElementById) {
   document.getElementById("jump").style.visibility="visible";
 }
}
function download_interpolate () { 
    	window.navigate("http://www.cadoptimize.com/_private/download_software/interpolate/inter_pnt.rar");
     	window.navigate("http://www.cadoptimize.com/php/index.php"); 
     }
function mostra(name_lay) { 
  if (document.all[name_lay].style.visibility=="visible") {
    document.all[name_lay].style.visibility="hidden";
    document.getElementById(name_lay).style.visibility="hidden";
  } else if (document.all[name_lay].style.visibility=="hidden") { //NN6 ed Opera
    document.getElementById(name_lay).style.visibility="visible";
  } 
}
function plan_prof_download (){
window.open('http://www.cadoptimize.com/php/plan_prof.php');
}
function inter_pnt_download (){
window.open('http://www.cadoptimize.com/php/interpolate_download.php');
}
function plan_prof_en_download(){
window.open('http://www.cadoptimize.com/php/plan_prof_en.php');
}
function map_making_en_download (){
window.open('http://www.cadoptimize.com/php/map_making_en.php');
}
function inter_pnt_download_de (){
window.open('http://www.cadoptimize.com/php/interpolate_download_de.php');
}
function swt(check) { 
  if (check == "yes") 
   	{  
  	oss.findn.checked = false ;
  	oss.cont.disabled = false ;   
  	check = "null";
 	}; 
   
   if (check == "no")
   	{  
  	oss.find.checked = false ;
   	oss.cont.disabled = false ;   
  	check = "null";
 	}; 
 	if (oss.find.checked == false)
 		{ if (oss.findn.checked == false)
			{
			oss.cont.disabled = true ;
 			}
 		};
   }
   
function dwndemo(check) { 
  if (ossf2.inter_pnt.checked == true) 
   	{  
  	ossf2.nodwn.checked = false ;
  	ossf2.cnt.disabled = false ; 
  	ossf2.inter_pnt.value = "yes";
  	check = "null";
 	}
 	else
 	{  
  	ossf2.inter_pnt.value = "no";
  	check = "null";
 	};
  
   if (ossf2.plan_prof.checked == true)
   	{  
  	ossf2.nodwn.checked = false ;
  	ossf2.cnt.disabled = false ;   
  	ossf2.plan_prof.value = "yes";
  	check = "null";
 	}
 	else
 	{  
  	ossf2.plan_prof.value = "no";
  	check = "null";
 	};
 	
 	if (ossf2.map_making.checked == true) 
   	{  
  	ossf2.nodwn.checked = false ;
  	ossf2.cnt.disabled = false ;   
  	ossf2.map_making.value = "yes";
  	check = "null";
 	}
 	else
 	{  
  	ossf2.map_making.value = "no";
  	check = "null";
 	};
 	
 	if (ossf2.lisp_surfaces.checked == true) 
   	{  
  	ossf2.nodwn.checked = false ;
  	ossf2.cnt.disabled = false ;   
  	ossf2.lisp_surfaces.value = "yes";
  	check = "null";
 	}
 	else
 	{  
  	ossf2.lisp_surfaces.value = "no";
  	check = "null";
 	};
	
 	
 	if (ossf2.inter_pnt.status == false) 
 		{ if (ossf2.plan_prof.status == false) 
 			{ if (ossf2.map_making.status == false) 
 				{ if (ossf2.lisp_surfaces.status == false)
 					{ if (ossf2.nodwn.checked == false) 
 					ossf2.cnt.disabled = true ;
					}
				}
			}
		};
    }
function dwndemono(check) { 
  	if (ossf2.nodwn.checked == true)
   	{  
  	ossf2.nodwn.value = "no" ;
  	ossf2.inter_pnt.status = false ;
  	ossf2.plan_prof.status = false ;
    ossf2.map_making.status = false ;
    ossf2.lisp_surfaces.status = false ;
   	ossf2.inter_pnt.value = "no" ;
  	ossf2.plan_prof.value = "no" ;
    ossf2.map_making.value = "no" ;
    ossf2.lisp_surfaces.value = "no" ;
    ossf2.cnt.disabled = false ;   
  	check = "null";
 	};
 	if (ossf2.inter_pnt.status == false) 
 		{ if (ossf2.plan_prof.status == false) 
 			{ if (ossf2.map_making.status == false) 
 				{ if (ossf2.lisp_surfaces.status == false)
 					{ if (ossf2.nodwn.checked == false) 
 					ossf2.cnt.disabled = true ;
					}
				}
			}
		};
    }
    
    
    function vote(check) { 
n_count = 0;
  if ((ossf3.vota_inter_pnt.value == "no_dwn") || (ossf3.vota_inter_pnt.value != "no value"))
   	{  
   	n_count = n_count + 1;
  	check = "null";
 	};
 	
  if ((ossf3.vota_plan_prof.value == "no_dwn") || (ossf3.vota_plan_prof.value != "no value"))
   	{  
   	n_count = n_count + 1;
  	check = "null";
 	};
 	
  if ((ossf3.vota_map_making.value == "no_dwn") || (ossf3.vota_map_making.value != "no value"))
   	{  
   	n_count = n_count + 1;
  	check = "null";
 	};
 	
   if ((ossf3.vota_lisp_surfaces.value == "no_dwn") || (ossf3.vota_lisp_surfaces.value != "no value"))
   	{  
   	n_count = n_count + 1;
  	check = "null";
 	};

 	
  if ( n_count == 4)
    {  
   	ossf3.cnt.disabled = false;
 	}
 	else
 	{  
   	ossf3.cnt.disabled = true;
 	};
  n_count_nd = 0;
   if ((ossf3.vota_inter_pnt.value == "no_dwn") && (ossf3.vota_plan_prof.value == "no_dwn") && (ossf3.vota_map_making.value == "no_dwn")&& (ossf3.vota_lisp_surfaces.value == "no_dwn"))
   {  
   n_count_nd = 1;
   }
   if  ((ossf3.observation.value == "") && (n_count_nd == 1))
   {  
   	ossf3.cnt.disabled = true;
 	}
 	else
 	if ((ossf3.observation.value != "") && (n_count_nd == 1))
 	{  
   	ossf3.cnt.disabled = false;
 	};
}

function open_window(windowphp,width,heigth,link) {
width_window=width;
heigth_window=heigth; 
left=screen.width-width_window-300;
heigth=(screen.height-heigth_window)/2; 
window.open(link,windowphp,"left="+left+",top="+heigth+",width=" +width_window+",height="+heigth_window+",menubar,toolbar,resizable");
}

function f_yes_no() {  
   if  (oss.findn.checked == true)
   {  
   	oss.action = "oss-f2.php"; 
 	}
 	else
 	{  
   	oss.action = "oss-f1.php";
 	};
}
function swt(check) { 
  if (check == "yes") 
   	{  
  	oss.findn.checked = false ;
  	oss.cont.disabled = false ;   
  	check = "null";
 	}; 
   
   if (check == "no")
   	{  
  	oss.find.checked = false ;
   	oss.cont.disabled = false ;   
  	check = "null";
 	}; 
 	if (oss.find.checked == false)
 		{ if (oss.findn.checked == false)
			{
			oss.cont.disabled = true ;
 			}
 		};
   }
function download_demo (name){
	window.open('http://www.cadoptimize.com/php/'+ name + '.php');
}







function prg_sel(NewValue){
if (NewValue == 0){
contact_us.price.selectedIndex = NewValue;
}
else
{
contact_us.price.selectedIndex = NewValue * 5;
};
contact_us.license.selectedIndex=0;
N_license(0);
}
function N_license(NewValue){
if (contact_us.S_prg.selectedIndex == 0){
contact_us.price.selectedIndex = contact_us.S_prg.selectedIndex;
}
else
{
contact_us.price.selectedIndex = contact_us.S_prg.selectedIndex * 5;
};

if (contact_us.license.selectedIndex == 0){
document.body.children.item(1).children.item(1).children.item(1).children.item(0).children.item(0).rows(1).cells(0).innerText = "n.license" ;
}
else
{
document.body.children.item(1).children.item(1).children.item(1).children.item(0).children.item(0).rows(1).cells(0).innerText = "n.licenses";
};

if (contact_us.sc.value > 0){
sconto = contact_us.sc.value / 100;
if (contact_us.license.selectedIndex == 0) {
contact_us.pr_sc.value= contact_us.price.value - (contact_us.price.value * 0.2);
};
if (contact_us.license.selectedIndex == 1) {
contact_us.pr_sc.value = (contact_us.price.value * 0.8) - ((contact_us.price.value * 0.8) * 0.2); 
contact_us.price.selectedIndex = contact_us.price.selectedIndex + 1;
}; 
if ((contact_us.license.selectedIndex > 1) && (contact_us.license.selectedIndex < 6)){
contact_us.pr_sc.value= (contact_us.price.value * 0.7) - ((contact_us.price.value * 0.7) * 0.2); 
contact_us.price.selectedIndex = contact_us.price.selectedIndex + 2;
}; 
if ((contact_us.license.selectedIndex > 5) && (contact_us.license.selectedIndex < 10)){
contact_us.pr_sc.value= (contact_us.price.value * 0.6) - ((contact_us.price.value * 0.6) * 0.2); 
contact_us.price.selectedIndex = contact_us.price.selectedIndex + 3;
}; 
if (contact_us.license.selectedIndex > 9){
contact_us.pr_sc.value= (contact_us.price.value * 0.5) - ((contact_us.price.value * 0.5) * 0.2); 
contact_us.price.selectedIndex = contact_us.price.selectedIndex + 4;
}; 
document.body.children.item(1).children.item(1).children.item(1).children.item(0).children.item(0).rows(5).cells(1).innerText = contact_us.pr_sc.value * (contact_us.license.selectedIndex + 1);
}
else
{
if (contact_us.license.selectedIndex == 1) {
contact_us.price.selectedIndex = contact_us.price.selectedIndex + 1 ;
}; 
if ((contact_us.license.selectedIndex > 1) && (contact_us.license.selectedIndex < 6)){
contact_us.price.selectedIndex = contact_us.price.selectedIndex + 2;
}; 
if ((contact_us.license.selectedIndex > 5) && (contact_us.license.selectedIndex < 10)){
contact_us.price.selectedIndex = contact_us.price.selectedIndex + 3;
}; 
if (contact_us.license.selectedIndex > 9){
contact_us.price.selectedIndex = contact_us.price.selectedIndex + 4;
};
document.body.children.item(1).children.item(1).children.item(1).children.item(0).children.item(0).rows(3).cells(1).innerText = contact_us.price.value  * (contact_us.license.selectedIndex + 1);
};
}


function img(check) { 
  if (check == "yes") 
   	{  
  	query_ins_data.linkimg.value = "images/" + query_ins_data.codice.value + ".ipg";
  	query_ins_data.linkimgchk.value = "no" ;   
  	check = "null";
 	}; 
   
   if (check == "no")
   	{  
  	query_ins_data.linkimg.value = "images/not-img.jpg";
  	query_ins_data.linkimgchk.value = "yes" ;   
  	check = "null";
 	};
   }






