function appliqueStyleErreur(nomChamp){     
    if( (document.getElementById(nomChamp).className != null) && (document.getElementById(nomChamp).className.length > 0) ){        
        document.getElementById(nomChamp).className = 'entourageErreur_'+document.getElementById(nomChamp).className ;
        document.getElementById(nomChamp).focus();
        return true ;
    }
                    
    if( (document.getElementById(nomChamp).style.border != null) && (document.getElementById(nomChamp).style.border.length > 0) ){
        document.getElementById(nomChamp).style.border = '1px solid #CC1541';
        document.getElementById(nomChamp).focus();
        return true ;
    }
    if( (nomChamp.match('radioBoutonSI3SI') != -1) || (nomChamp.match('comboBoxSI3SI') != -1) ){
        if(document.getElementById(nomChamp).style.border != null){           
            document.getElementById(nomChamp).style.border = '1px solid #CC1541';
            document.getElementById(nomChamp).focus();
            return true ;
        }
    }
    return false ;
}
function openPopupPage(urlPopup,urlPage,mWidth,mHeigth) {
    window.open(urlPopup+"?urlPage="+urlPage,"","width="+mWidth+",height="+mHeigth+",left=" + 
            ((screen.width - mWidth)/2) + ",scrollbars=yes, top=" + ((screen.height - mHeigth)/2) );
}
function openPopupNousContacter() {
            window.open("portlets/nousContacter/NousContacterController.jpf?premiere=oui","","scrollbars=yes, width=500,height=470,left=" + 
                ((screen.width - 500)/2) + ",top=" + ((screen.height - 470)/2) );
}
function getEvent(event)
{
    if (!event)
    {
        var event = window.event;
    }
    return event;
}
var console = new Console();
function Console()
{
    this.canvas = null;
    this.println = consolePrintln;
    this.show = consoleShow;
}
function consolePrintln(object)
{
    if (!this.canvas)
    {
        this.canvas = window.open("about:blank", "Console", "toolbar = no, width = 640, height = 480, directories = no, status = no, scrollbars = yes, resize = no, menubar = no");
    }
    this.canvas.document.write(object);
    this.canvas.document.write("<br/>");
}
function consoleShow(object)
{
    this.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
    for (property in object)
    {
        this.println(property + " = " + eval("object." + property));
    }
    this.println("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
}
function presence_frame()
{
	if (parent.location != document.location)
	if(parent.frames[0] || parent.frames[1] )
	{
		//window.alert("Frameset detecte : relocation vers 3 suisses.fr");		
		parent.location.replace("http://www.vitrinemagique.com");
	}
}
