var prefsRemoteHost = 'http://www.schl.ch';
function jump(strURL){
	var myURL = new String (window.document.location);
	var myPosition = myURL.lastIndexOf('#');
	
	if (myPosition>0){
		window.document.location=unescape(myURL.slice(0,myPosition))+strURL;
	}else{
		window.document.location=unescape(window.document.location)+strURL;
	}
}

function GenRandoID(){
	var IntRando = Math.random()
	return (Math.round(IntRando * 2147483000));
}


function popupWindow(strUrl, noId) {
    window.open(strUrl, noId, 'width=400,height=400');
}
function popupCredits(strUrl, noId) {
    window.open(prefsRemoteHost + '/fr/'+ strUrl, noId, 'width=315,height=570');
}

var mywinmap;
function popupMap(entityid) {
    mywinmap = window.open('/fr/immeubles/show.immeuble.geo.asp?entityid=' + entityid, 'displaymap', 'width=600,height=600');
    mywinmap.focus();

}

function popupMapSchl() {
    mywinmap = window.open('/fr/map/schl_adresse.asp', 'displayshcl', 'width=550,height=550');
    mywinmap.focus();

}

function openMedia(strId){

    
        var strURL = prefsRemoteHost + "/medias/media.player.famille.asp?MediaID=" + strId + "&EntityID=" + jsEntityID + '&pxy=' + GenRandoID();
        var winMedia = window.open(strURL,'MediaPlayer','status=yes,scrollbars=yes,resizable=yes,width=600,height=600');
        winMedia.focus();
}

function redirURL(strParam,immoguid){
    strParam = strParam.replace('&amp;','[ezamp]') ;
    strParam = strParam.replace('?','[ezquesti]')
    strParam = strParam.replace('http://','[ezhttp]')
    strParam = strParam.replace('=','[ezequal]')
    void(window.open(prefsRemoteHost + '/fr/immeubles/mapredir.asp?redirurl=' + strParam + '&immoid='+ immoguid ,'',''));
}



