﻿function jnu(u) { 
    window.location = u;
}

function jnutb(u,winname) { 
    window.open(u, winname);
}


/* Global Namespace */
Type.registerNamespace('CS.Utils'); 

CS.Utils.goToUrl = function(url){
    window.location = arguments.join('//');
}

CS.Utils.goToUrlNewWindow = function(url){
    window.open(arguments.join('//'), '', '');
}

CS.Utils.Login = {};

CS.Utils.Login._MultiLogin = function(loginID, userID, sites /* [{url:'www.aspfr.com', remember:true}] */ ){
    
    window.setTimeout(function(){
    for (var i = 0; i < sites.length; i++){
        var site = sites[i]; 
        
        var url = 'http://' + site.url + '/QuickLogin.aspx?loginId=' + loginID + '&userID=' + userID + '&remember=' + (site.remember?1:0) + (sites[i+1]?'':'&last=1'); 
        
        var ifr = document.createElement('iframe');
        ifr.style.width = '100px'; 
        ifr.style.height = '100px';
        ifr.style.position = 'absolute'; 
        ifr.style.top = (i * 100) + 'px'; 
        ifr.style.left = '0px';
        ifr.src = url;

        document.getElementsByTagName('body')[0].appendChild(ifr); 
    }}, 500);
}

function validate_Confirm(txt)
{
	if(confirm(txt))
	{
		return true;
	}else{
		alert('Action annulée');
		return false;
	}
}
function howManyChecked(whichCheckBox)
{
	var _countChecked = 0;
	var err = 0;
	if(document.getElementById(whichCheckBox).checked==true)
	{
		_countChecked++;
	}
	if(_countChecked == 0)
		{ alert('Veuillez lire la charte de bonne conduite puis cochez la case comme quoi vous en acceptez les termes');
			err = 1;}
	if (err == 1) { 
	    return false; 
    } else {
        return true;
    }
}

function showgglangs(opt, lnklng, divautre)
{
    if (opt == 0)
    {
        document.getElementById(lnklng).href = "javascript:showgglangs(1,'" + lnklng + "','" + divautre + "');";
        document.getElementById(lnklng).innerHTML = "Masquer les autres langages";
        document.getElementById(divautre).style.display = "inline";
        document.getElementById(divautre).style.position = "relative";
        document.getElementById(divautre).style.visibility = "visible";
    } else {
        document.getElementById(lnklng).href = "javascript:showgglangs(0,'" + lnklng + "','" + divautre + "');";
        document.getElementById(lnklng).innerHTML = "Afficher les autres langages";
        document.getElementById(divautre).style.display = "none";
        document.getElementById(divautre).style.position = "relative";
        document.getElementById(divautre).style.visibility = "hidden";
    }
}

function ouvremoi(url,titre,nombox)
{
    window.open(url, nombox, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,height=250,width=450');
}

google_alternate_ad_url = "http://www.dotnet-news.com/adsense-alternative.aspx";

function cntp(a) { document.write("<img src=\"/cntp.aspx?r=" + a + "\" width=\"0\" height=\"0\" border=\"0\" style=\"margin:0px;padding:0px\" />"); }
