// CG46 Base de données du patrimoine
// Bibliothèque de fonctions
// Juin 2002
//
// Interface Grand Public
//
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
function over(obj){
	obj.className = "boutonovergp"
}

//-----------------------------------------------------------------------------
function out(obj){
	obj.className = "boutongp"
}

//-----------------------------------------------------------------------------
function AffichActus(type){
	window.open('Actualites.asp?type='+type ,'actu','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=420,top=0,left=0')
}
function AffichActu(actu){
	window.open('Actualite.asp?actu='+actu,'actu','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=560,top=0,left=0')
}

//-----------------------------------------------------------------------------
function OpenPlus(page, sizeX, sizeY){
		//suppression de l'extension du nom de la page
		var fin = page.indexOf(".",0);
		var nompage = page.substring(0, fin);
		nompage = nompage.replace("/","_");

		mywin = window.open(page, nompage, 'scrollbars=yes,resizable=yes,width='+sizeX+',height='+sizeY+',top=5,left=50');
}
//-----------------------------------------------------------------------------		
function WinOpen(){
	var hauteur=window.screen.availheight-20
	var largeur=window.screen.availwidth
	window.open('recherche.asp','patrimoine','resizable=yes, menubar=no, top=0, left=0, height='+hauteur+', width='+largeur) 
}
//-----------------------------------------------------------------------------
function AffichFiche(refer){
	window.open('Fiche.asp?refer='+refer, refer, 'scrollbars=yes,resizable=yes,width=756,height=500')
}
//-----------------------------------------------------------------------------
function AffichLegende(){
	window.open('Legende_carte.html','légende','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=400,left=20,top=20')
}
//-----------------------------------------------------------------------------
//function AffichActu(){
//	window.open('Actualites.asp','actu','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=500,top=0,left=0')
//}
function AffichActu(actu){
	window.open('Actualite.asp?actu='+actu,'actu','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=500,top=0,left=0')
}

//-----------------------------------------------------------------------------
function AffichSite(selection){
	window.open('ListeSite.asp?liste=<%=ListeSite%>&selection='+selection,'tout'+selection,'scrollbars=yes,width=425,height=400')
}

//-----------------------------------------------------------------------------
//Appel depuis le Flash
function AffichCarte(commune, pointX, pointY, site){
	var LogicalScale

	if( ((pointX=="")&&(pointY=="")) || ((pointX=="0")&&(pointY=="0")) ){
		LogicalScale="10"
		pointX="530474"
		pointY="1939148"	
	}else{
		LogicalScale="7"
	}

	var chaine = "/cg46/sig/sig_fo.asp?XgoCG46Liste="+site+"&XgoCG46COM="+commune+"&XgoPointX="+pointX+"&XgoPointY="+pointY+"&XgoSetLogicalScale="+LogicalScale+"&XgoTabs=Web"	
	window.open(chaine ,'carte','fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=620,height=570,top=20,left=10')
}
