﻿//ouvre une fenetre fille retaillable    	


function getRules()
{
new_browser('/trip_to_paris-contest_rules.asp','contestrules',500,600)
}
function getRulesDiner()
{
new_browser('/promo/dinerWithATouchOfTheater/diner_with_rules.asp','contestrules',500,500)
}

function getFormulaire()
{
window.open('/promo/dinerWithATouchOfTheater/Entry_Form-27072007.pdf')
}


function openPub()
{
new_browser_normal('/trip_to_paris-contest_pub.asp','franceguide',800,600)
}

function new_browser_normal(src,name,w,h)
{
	size=",width="+w+",height="+h
	browser=window.open(src,name,"resizable=yes,scrollbars=yes,toolbar=yes,status=yes,menubar=yes,location=1,directories=yes"+size)
}

function new_browser(src,name,w,h)
{
	size=",width="+w+",height="+h
	browser=window.open(src,name,"resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,location=0,directories=no"+size)
}


//ouvre une fenetre fille de taille fixe   
function new_browser3(src,name,w,h)
{
	size=",width="+w+",height="+h
	browser=window.open(src,name,"resizable=no,scrollbars=no,toolbar=no,status=no,menubar=no,location=0,directories=no"+size)
}	


//ouvre une photo dans une fenetre fille à la taille de la photo
function fenetrephoto2 (repimages, lo, ha, nomimage,id)
{	
	browser=window.open("visualisation.asp?image="+repimages+"&id="+id, nomimage,"resizable=no,scrollbars=auto,toolbar=no,status=no,menubar=no,location=0,directories=no,width="+lo+",height="+ha)
}




function remisezero_collection(nb)
	{
		if (nb !=1 ) {document.leform.liste_chateaux.selectedIndex=0;}
		if (nb !=2 ) {document.leform.liste_vintage.selectedIndex=0;}
		if (nb !=3 ) {document.leform.liste_color.selectedIndex=0;}
		if (nb !=4 ) {document.leform.liste_size.selectedIndex=0;}
		if (nb !=5 ) {document.leform.liste_packing.selectedIndex=0;}
		if (nb !=6 ) {document.leform.liste_village.selectedIndex=0;}
		if (nb !=7 ) {document.leform.liste_region.selectedIndex=0;}
		if (nb !=8 ) {document.leform.liste_classification.selectedIndex=0;}
		document.leform.action=document.location.pathname +  document.location.search
		document.leform.submit()
	}	
	
function remisezero_valuation(nb)
	{
		if (nb !=1 ) {document.leform.liste_chateaux.selectedIndex=0;}
		if (nb !=2 ) {document.leform.liste_vintage.selectedIndex=0;}
		if (nb !=3 ) {document.leform.liste_color.selectedIndex=0;}
		if (nb !=4 ) {document.leform.liste_size.selectedIndex=0;}
		document.leform.action=document.location.pathname +  document.location.search
		document.leform.submit()
	}		

function remisezero_tasting(nb)
	{
		if (nb !=1 ) {document.leform.liste_chateaux.selectedIndex=0;}
		if (nb !=2 ) {document.leform.liste_vintage.selectedIndex=0;}
		if (nb !=3 ) {document.leform.liste_color.selectedIndex=0;}
		if (nb !=4 ) {document.leform.liste_size.selectedIndex=0;}
		if (nb !=9 ) {document.leform.liste_parker.selectedIndex=0;}
		if (nb !=10 ) {document.leform.liste_conservation.selectedIndex=0;}
		document.leform.action=document.location.pathname +  document.location.search
		document.leform.submit()
	}			
	
function selecttoutchateaux(cas,choix)
{
	if(choix.length>0)
	{
		if (cas.checked)
		{
			for (var i=0; i<choix.length;i++)
			{
				choix[i].checked=true
			}
		}
		else
		{
			for (var i=0; i<choix.length;i++)
			{
				choix[i].checked=false
			}
		}
	}
	else
	{
		if (cas.checked)
		{
			choix.checked=true
		}
		else
		{
			choix.checked=false
		}
	}
}

function envoisellship(lechoix)
{
	test=true
	if (!control(document.forms.leform.chateaucoche, 'checked'))
	{
		alert("Please select one chateau at least.")
		test=false
	}
	if (test==true && lechoix==1) document.leform.action="sellship.asp?lechoix=1&sX_Menu_selectedID=topLeft_D131F557";
	if (test==true && lechoix==2) document.leform.action="sellship.asp?lechoix=2&sX_Menu_selectedID=topLeft_E801A49B";
	if (test==true) document.leform.submit();
}

function decProduit(pk)
{
	document.leform.decProduit.value = pk;
	document.leform.submit();
}

function incProduit(pk)
{
	document.leform.incProduit.value = pk;
	document.leform.submit();
}


function diplaygraphics()
{
new_browser('graphics_popup.asp','graphics',780,600)
}