﻿function OpenPop(url,width,height)
{
var w = width, h = height;

if (document.all) {
   /* the following is only available after onLoad */
   w = document.body.clientWidth;
   h = document.body.clientHeight;
}
else if (document.layers) {
   w = window.innerWidth;
   h = window.innerHeight;
}

var popW = width, popH = height;

var leftPos = (w-popW)/2, topPos = (h-popH)/2;

    window.open(url,null, 'height='+popH+',width=' + popW + ',top='+topPos+',left='+leftPos+',status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes');
}

function OpenLink(url)
{
    window.open(url,'');
}

function OpenPopCheck(type,id)
{
var alias = document.getElementById(id).value;
if(alias != '')
{
var w = 150, h = 50;

if (document.all) {
   /* the following is only available after onLoad */
   w = document.body.clientWidth;
   h = document.body.clientHeight;
}
else if (document.layers) {
   w = window.innerWidth;
   h = window.innerHeight;
}

var popW = 150, popH = 50;

var leftPos = (w-popW)/2, topPos = (h-popH)/2;
var url = '../Member/Check.aspx?type='+type+'&value='+alias;

    window.open(url,null, 'height='+popH+',width=' + popW + ',top='+topPos+',left='+leftPos+',status=yes,toolbar=no,menubar=no,location=no');
    }
    else
    {
    alert('Please enter value to check');
    }
}

function Validate(id)
{
var alias = document.getElementById(id).value;
if(alias != '')
{
    confirm('Is '+alias+' correct alias?');
}
    else
    {
    alert('Please enter alias!');
    }
}

