﻿
function WatermarkFocus(txtElem, strWatermark) {
    if (txtElem.value == strWatermark) txtElem.value = '';
}
function WatermarkBlur(txtElem, strWatermark) {
    if (txtElem.value == '') txtElem.value = strWatermark;
}

function ImagePopup(ImageUrl) 
{
    var name = "ImagePop";
    var w = 50;
    var h = 50;
    var url = "/imagepop.htm?" + ImageUrl;
    
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		var winX = (screen.availWidth - w)*.5;
		var winY = (screen.availHeight - h)*.5;
	//	popupWin = window.open(url, name, "resizeable=1,status=no,scrollbars=no,menubar=no,toolbar=no,width=" + w + ",height=" + h + ",left=" + winX + ",top=" + winY);
		popupWin = window.open(url, name, "resizeable=1,status=no,scrollbars=no,menubar=no,toolbar=no,width=" + w + ",height=" + h);
    }
	else
	{
		var winX = window.screenX + ((window.outerWidth - w) / 2);
		var winY = window.screenY + ((window.outerHeight - h) / 2);
//				popupWin = window.open(url, name, "resizeable=1,status=0,scrollbars=0,menubar=0,toolbar=0,width=" + w + ",height=" + h + ",screenX=" + winX + ",screenY=" + winY);
		popupWin = window.open(url, name, "resizeable=1,status=0,scrollbars=0,menubar=0,toolbar=0,width=" + w + ",height=" + h);
    }
			
			
}


// functions for ad-pay category drop downs

function RedirectToUrl(strUrl) {
    window.location = strUrl;
}

function RedirectToDropDownUrl(dropDown) {
    var strUrl = dropDown.options[dropDown.selectedIndex].value
    window.location = strUrl;
}

function RedirectToDropDownUrlNewWindow(dropDown) {
    var strUrl = dropDown.options[dropDown.selectedIndex].value
    window.open(strUrl);
}

function DoRedirectToMyAccount() {
    window.location = "/Subscription/MyAccount.aspx";
}

function DoRedirectToLogin() {
    var url = window.location.href;
    if (url.indexOf("Login") < 0) {
        window.location = "/Subscription/Login.aspx?LoginRedirect=" + escape(window.location);
    }
    else {
        window.location = "/Subscription/Login.aspx";
    }
}

function DoRedirectToRegister() {
    window.location = "/Subscription/Register.aspx";
}

function DoRedirectToLogout() {
    window.location = "/Subscription/Logout.aspx";
}

