  

// SUBROUTINES
// --------------------------------------------------------------------------------------------



function pop_color(id){

   var url;
	var width;

	if(id != 4){ url = 'color_table.php?id='+id; width = 330; }else{  url = 'color_table_sport.php?id='+id; width = 440; }

	   if (navigator.appName != 'Netscape'){
          win=window.open(url,"s_sec","resizable=yes,height=490,width="+width);
	   }
	   else{
          win=window.open(url,"s_sec","height=490,resizable=yes,width="+width);
      }

}


function swap_img(){

 var current_src = document.prod4.src;

 if (current_src == 'http://www.comoframe.com/images/prod4_img0.gif'){
	document.prod4.src = 'http://www.comoframe.com/images/prod4_img1.gif';
 }
 else if(current_src == 'http://www.comoframe.com/images/prod4_img1.gif'){
	document.prod4.src = 'http://www.comoframe.com/images/prod4_img2.gif';
 }
 else{
 	document.prod4.src = 'http://www.comoframe.com/images/prod4_img0.gif';
 }

}



function submit_color(){

 document.reload.sport.value = document.pr4.size.value;
 document.reload.submit();


}



function pop_img(src){

	url = 'prod_viewer.php?src='+src; 

	   if (navigator.appName != 'Netscape'){
          win=window.open(url,"s_sec","resizable=yes,height=320,width=380");
	   }
	   else{
          win=window.open(url,"s_sec","height=320,resizable=yes,width=380");
      }

}


function pop_costi_invio(){

	url = 'costi_spedizione.php'; 

	   if (navigator.appName != 'Netscape'){
          win=window.open(url,"s_sec","resizable=yes,height=320,width=380,scrollbars");
	   }
	   else{
          win=window.open(url,"s_sec","height=320,resizable=yes,width=380,scrollbars");
      }

}


function pop_info_pay(){

	url = 'modalita_pagamento.php'; 

	   if (navigator.appName != 'Netscape'){
          win=window.open(url,"s_sec","resizable=yes,height=450,width=450,scrollbars");
	   }
	   else{
          win=window.open(url,"s_sec","height=450,resizable=yes,width=450,scrollbars");
      }

}


function pop_mido(){
          win=window.open("mido.html","mido","resizable=no,height=190,width=625");
}





function confirm_del(){


	if(confirm('Prego confermare eliminazione Account')){document.del.submit();}


}



function confirm_mod_pw(){

	if(confirm('Prego confermare la modifica')){document.mod.submit();}

}


function submit_sistema(){

 	if(document.pr5.sistema.value == 'tab'){
     	document.pr5.prod.value = 'opt';
 	}else{
     	document.pr5.prod.value = 'opi';
 	}

}



function refresh_page(){

id_n = document.shop_s2.id_nazione.value;
rec  = document.shop_s2.recapito.value;
note = document.shop_s2.note.value;
paym = document.shop_s2.pay_mod.value;


document.reload.id_nazione.value=id_n;
document.reload.recapito.value=rec;
document.reload.note.value=note;
document.reload.pay_mod.value=paym;


if(document.shop_s2.no_cart_erase.checked){
	document.reload.no_cart_erase.value = 1;
}else{
	document.reload.no_cart_erase.value = 0;
}

document.reload.submit();
 

}
