var msgTitle = "Campingvognsudlejning.dk";
var win = null;

function showMessage(msg)
{
    radalert(msg, 400, 200, msgTitle);
}
        
function showMessage_Redirect(msg, targetURL)
{  
//debugger;      

    var win = radalert(msg, 400, 200, msgTitle);

    if(win == null)
        window.location.href = targetURL;
    else
    {    
        if (targetURL && targetURL.length > 0)
        {
            win.OnClientClose = function()  
            {
                var appVer  = navigator.appVersion;
                var NScp = (navigator.appName == 'Netscape') && ((appVer.indexOf('3') != -1) || (appVer.indexOf('4') != -1));
                var MSIE = (appVer.indexOf('MSIE 4') != -1);
                if (NScp || MSIE)
                    window.location.replace(targetURL);
                else
                    window.location.href = targetURL;
            };
        }
    }
}

function newWindow(mypage,myname,w,h,features)
{
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += features;
	win = window.open(mypage,myname,settings);
	if (win == null) alert(popupmessage);
	else win.window.focus();
}

