
function openWiz(url, redirect)
{
	var oLink = {href: "",name: "",title: null,target: null,className: null,style: null};
	width = 700;
	height = 575;
	//alert("wbservice");
	if (url.indexOf("http:") == -1)
	{
		url = "http://" + url;
	}

	if (redirect == "true")
	{
		location.href = url;	
	} else {
		str = window.showModalDialog(url + "&WebbyzzLoggedIn=6144","", "status:no; center:yes; help:no; minimize:no; maximize:no; scroll:no; border:thin; statusbar:no; dialogWidth:" + width + "px; dialogHeight:" + height + "px");
//	alert(oLink.href)
		if (str != "" && str != undefined)
			{
			location.href = str;
			}
		}
	
}

function WBPrint() {
	window.focus();
	if(window.print)
		window.print();

}

function WBLogUrlRequest(strUrl) {
	window.open('/_system/services/logUrlRequest.asp?page='+strUrl,'','toolbar=no,status=no,titlebar=no,menubar=no,resizable=yes,scrollbars=yes,width=1,height=1,left=0,top=0')	
}

function golien(intNoLien) {
	window.open("/lien/lien-redirect.asp?xnolien="+intNoLien);
}

function gotoshow(){
	window.open('http://tourismecantons.qc.ca/_system/baniere/adclick2.asp?adresse='+slidelinks[whichlink],'stat')
}

function WBGoLien(intNoLien, intNoType, strUrl) {
//********************************************************
// Modifie le lien selon son type
//********************************************************	

// Variable du no de site pour les statistiques

	if ((intNoType==1176) || (intNoType==1177)){
	//page interne

		if (!((strUrl.indexOf("ttp://") > 0) || (strUrl.indexOf("ww.") > 0))){
				strUrl = "http://mrcroussillon.webbyzz.com" + strUrl;
		}

		if (intNoType==1177) 
		{
		// page interne avec popup
			window.open(strUrl);
		}
		else
		{
		// page interne sans popup
			location.href = strUrl;
		}
	}else{
		if ((intNoType==1178) || (intNoType==1180)){
		//page externe

			if (!((strUrl.indexOf("ttp://") > 0) || (strUrl.indexOf("ww.") > 0))){
					strUrl = "http://" + strUrl;
			}

			if (intNoType==1178) 
			{
		// page externe avec popup
				window.open(strUrl);
			}
			else
			{
		// page interne sans popup
				location.href = strUrl;
			}
		}else{
				window.open(strUrl);
			}
		}
	}



//page interne
//	if((intNoType==11) && (intNoLien==0)){
//		if (!(strUrl.indexOf("ttp://") > 0))
//		{
//				strUrl = "http://" + strUrl;
//		}
//		location.href = strUrl
//		//parent.location.href = "http://director.marigny.com/d-click.php?aid="+strIDSite+"&url="+strUrl;
//
//	
//	}else{
//page externe
//		if ((intNoType==13) || (intNoType==12)){
//			//WBLogUrlRequest(strUrl)
//			if (!((strUrl.indexOf("ttp://") > 0) || (strUrl.indexOf("ww.") > 0))){
//					strUrl = "http://cld-longueuil.ca" + strUrl;
//			}
//			if (intNoType==13) 
//			{
//				window.open(strUrl);
//			}
//			else
//			{
//				location.href = strUrl;
//			}
//			//window.open("http://director.marigny.com/d-click.php?aid="+strIDSite+"&url="+strUrl);
//		}else{
//image						
//			if ((intNoType==10) && (strUrl.indexOf(".htm") > 0))
//			{
//				strUrl = "http://cld-longueuil.ca" + strUrl
//				//window.open("http://director.marigny.com/d-click.php?aid="+strIDSite+"&url="+strUrl);
//				location.href = strUrl
//			}else{
//				window.open(strUrl);
//			}
//		}
//	}
//}

function WBSendPage() {
	window.open('/_system/services/sendpage.asp?page='+location.pathname,'','toolbar=no,status=no,titlebar=no,menubar=no,resizable=yes,scrollbars=yes,width=650,height=440,left=0,top=0')	
}


function WBPrintPage() {
	window.open('/_system/services/printpage.asp?page='+location.pathname,'','toolbar=no,status=no,titlebar=no,menubar=no,resizable=yes,scrollbars=yes,width=640,height=740,left=0,top=0')
}

function WBPrintPageTheme() {
	window.open('/_system/services/printpage.asp?theme='+document.all.xthemecourant.value,'','toolbar=no,status=no,titlebar=no,menubar=no,resizable=yes,scrollbars=yes,width=620,height=740,left=0,top=0')
}
