// -----------
function mouseUpPopUp(oEvent){
	if(oElmToDrag){
		oElmToDrag = null;
	}
	if(oEvent.stopPropagation){
		oEvent.stopPropagation();
	}
	oEvent.cancelBubble = true;
}
// -----------
function showPopUp(oEvent, strURL, intHeight, intWidth, bPositionAtClick){
	if(typeof isPublicWeb != "undefined" && isPublicWeb == true){
		
		/*ORG
		var oPopUp = getCSSObj("popupBigDiv");
		oPopUp.display = "none";
		var intHeight = (typeof intHeight != "undefined")? (intHeight >= 6)? intHeight : 6 : 215;
		var intWidth = (typeof intWidth != "undefined")? intWidth : 291;
		window.frames["popupIframe"].location.href = strURL + "&height=" + intHeight + "&width=" + intWidth;
		
		var oBodyElm = (is.ie && is.intV >= 6)? document.documentElement : document.body;
		var intScrollLeft = (is.safari)? 0 : (typeof window.pageXOffset != "undefined")? window.pageXOffset : oBodyElm.scrollLeft;
		var intScrollTop = (is.safari)? 0 : (typeof window.pageYOffset != "undefined")? window.pageYOffset : oBodyElm.scrollTop;
		oPopUp.left = ((bPositionAtClick || typeof bPositionAtClick == "undefined")? (oEvent.clientX + intScrollLeft + 60) : (intScrollLeft + 350)) + "px";
		oPopUp.top = ((bPositionAtClick || typeof bPositionAtClick == "undefined")? (oEvent.clientY + intScrollTop - 20) : (intScrollTop + 200)) + "px";		
		getCSSObj("popupBigDiv").height = intHeight + ((is.ie && is.bWin && is.intV < 6)? 2 : 0) + "px";
		getCSSObj("popupBigDiv").width = intWidth + ((is.ie && is.bWin && is.intV < 6)? 2 : 0)+ "px";
		*/
		
		var oPopupWrapper = getCSSObj("popupBigDiv");
		var oPopup = getElm("popupIframe");
		var intHeight = (typeof intHeight != "undefined")? (intHeight >= 6)? intHeight : 6 : 215;
		var intWidth = (typeof intWidth != "undefined")? intWidth : 291;
		//var frmPopup = window.frames["popupIframe"];
		//frmPopup.location.href = strURL + "&height=" + intHeight + "&width=" + intWidth;
                var frmPopup = document.getElementById("popupIframe");
                frmPopup.src = "";
                for (var i = 0; i < 1000; i++) i=i; // because of Safari
                frmPopup.src = strURL + "&height=" + intHeight + "&width=" + intWidth;
		var oBodyElm = (is.ie && is.intV >= 6)? document.documentElement : document.body;
		var intScrollLeft = (is.safari)? 0 : (typeof window.pageXOffset != "undefined")? window.pageXOffset : oBodyElm.scrollLeft;
		var intScrollTop = (is.safari)? 0 : (typeof window.pageYOffset != "undefined")? window.pageYOffset : oBodyElm.scrollTop;
		oPopupWrapper.left = ((bPositionAtClick || typeof bPositionAtClick == "undefined")? (oEvent.clientX + intScrollLeft + 60) : (intScrollLeft + 350)) + "px";
		oPopupWrapper.top = ((bPositionAtClick || typeof bPositionAtClick == "undefined")? (oEvent.clientY + intScrollTop - 20) : (intScrollTop + 200)) + "px";		
		oPopupWrapper.height = (intHeight -11) + ((is.ie && is.bWin && is.intV < 6)? 2 : 0) + "px";
		oPopupWrapper.width = intWidth + ((is.ie && is.bWin && is.intV < 6)? 2 : 0)+ "px";
		oPopupWrapper.display = "block";
		oPopup.style.width = oPopupWrapper.width;
		oPopup.style.height = (parseInt(oPopupWrapper.height) -21) + "px";
		
		if(oEvent.stopPropagation){
			oEvent.stopPropagation();	
		}
		oEvent.cancelBubble = true;
	}
}
// -----------
function hidePopup(oEvent, bFromIframe){	
	var oElm = getElm("popupBigDiv");
	if(oElm){		
		var oCSSElm = getCSSObj("popupBigDiv");
		oCSSElm.display = "none";
	}
}
// -----------
function CUSTOMER_openLayerPopupAtClick(oEvent, strURL, intHeight, intWidth){
	showPopUp(oEvent, strURL, intWidth, intHeight, true);
}
// -----------
function CUSTOMER_openLayerPopupInTheMiddle(oEvent, strURL, intHeight, intWidth){
	showPopUp(oEvent, strURL, intWidth, intHeight, false);	
}
// -----------
// ----------- PopUp for Campaign
function showPopUpCampaign(oEvent, strURL, intHeight, intWidth, bPositionAtClick){
	if(typeof isPublicWeb != "undefined" && isPublicWeb == true){
		var oPopupWrapper = getCSSObj("popupBigDiv");
		var oPopup = getElm("popupIframe");
		var intHeight = 210;
		if(is.ie5){
			var intWidth = 289;
		}
		else if (is.ie55){
			var intWidth = 289;
		}	
		else{	
			var intWidth = 291;
		}
		if(is.bMac){
			if(is.ie){
				var frmPopup = window.frames["popupIframe"];
				frmPopup.location.href = strURL + "&amp;height=" + intHeight + "&width=150";	
			}else{
				var frmPopup = getElm("popupIframe");
				frmPopup.src = strURL + "&height=" + intHeight + "&width=150";		
			}		
		}else{
			var frmPopup = getElm("popupIframe");
			frmPopup.src = strURL + "&height=" + intHeight + "&width=150";		
		}
		var oBodyElm = (is.ie && is.intV >= 6)? document.documentElement : document.body;
		var intScrollLeft = (is.safari)? 0 : (typeof window.pageXOffset != "undefined")? window.pageXOffset : oBodyElm.scrollLeft;
		var intScrollTop = (is.safari)? 0 : (typeof window.pageYOffset != "undefined")? window.pageYOffset : oBodyElm.scrollTop;
		oPopupWrapper.left = ((bPositionAtClick || typeof bPositionAtClick == "undefined")? (oEvent.clientX + intScrollLeft + 60) : (intScrollLeft + 350)) + "px";
		if(is.ie5){
			oPopupWrapper.top = ((bPositionAtClick || typeof bPositionAtClick == "undefined")? (oEvent.clientY + intScrollTop + 350) : (intScrollTop + 200)) + "px";
		}
		else if(is.ns6){
			oPopupWrapper.top = ((bPositionAtClick || typeof bPositionAtClick == "undefined")? (oEvent.clientY + intScrollTop + 350) : (intScrollTop + 200)) + "px";
		}
		else{
			oPopupWrapper.top = ((bPositionAtClick || typeof bPositionAtClick == "undefined")? (oEvent.clientY + intScrollTop + 120) : (intScrollTop + 200)) + "px";
		}
		oPopupWrapper.height = (intHeight -11) + ((is.ie && is.bWin && is.intV < 6)? 2 : 0) + "px";
		oPopupWrapper.width = intWidth + ((is.ie && is.bWin && is.intV < 6)? 2 : 0)+ "px";
		oPopupWrapper.display = "block";
		oPopup.style.width = oPopupWrapper.width;
		oPopup.style.height = (parseInt(oPopupWrapper.height) -21) + "px";
		if(oEvent.stopPropagation){
			oEvent.stopPropagation();	
		}
		oEvent.cancelBubble = true;
	}
}
// -----------
function hidePopup(oEvent, bFromIframe){	
	var oElm = getElm("popupBigDiv");
	if(oElm){		
		var oCSSElm = getCSSObj("popupBigDiv");
		oCSSElm.display = "none";
	}
}
// -----------
function CUSTOMER_openLayerPopupAtClickCampaign(oEvent, strURL, intHeight, intWidth){
	showPopUpCampaign(oEvent, strURL, intWidth, intHeight, true);
}
// -----------
function CUSTOMER_openLayerPopupInTheMiddleCampaign(oEvent, strURL, intHeight, intWidth){
	showPopUpCampaign(oEvent, strURL, intWidth, intHeight, false);	
}
// -----------