function openTAB(n,winname,x,y) {	var winx = (screen.width - x) / 2;    var winy = (screen.height - y) / 2;	var winsettings= "width="+x+",height="+y+",top="+winy+",left="+winx+",location=no,menubar=no,toolbar=no,scrollbars=auto,resizable"	window.open(n,winname,winsettings);}function resizeImage(name,desW,desH){var imgW, imgH, scale;imgW = eval('document.'+name+'.width');imgH = eval('document.'+name+'.height');if (imgW == 0) {var dummyImg;dummyImg = new Image();dummyImg.src = eval('document.'+name+'.src');imgW = dummyImg.width;imgH = dummyImg.height}if (imgW > imgH) {scale = desW / imgW;}else {if (imgH > 0)scale = desH / imgH;}imgH = imgH * scale;imgW = imgW * scale;eval('document.'+name+'.width='+imgW);eval('document.'+name+'.height='+imgH);}function goLogout() {try { if (opener.name != 'opener') { popUp('commctr.asp?logout=1','154','182','comm'); }} catch (Exception) { popUp('commctr.asp?logout=1','154','182','comm'); }}function popUp(URL,passW,passH) {day = new Date();id = day.getTime();if (passW == 800)page = window.open(URL, "Page"+id , "'toolbar=0,scrollbars=-1,resizable=-1,location=0,statusbar=0,menubar=0,width=" + passW + ",height=" + passH + "'");elsepage = window.open(URL, "Page"+id , "'toolbar=0,scrollbars=0,resizable=0,location=0,statusbar=0,menubar=0,width=" + passW + ",height=" + passH + "'");//var tt = ("page"+id) if (page.opener == null) page.opener = window;     page.opener.name = "opener";    }function popUp(URL,passW,passH,winName) {var properties = "toolbar=0,location=0,scrollbars=0,resizable=1,statusbar=0,menubar=0,height=" + passH;properties = properties + ",width=" + passW;var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;if(navigator.appName == "Microsoft Internet Explorer") {screenY = document.body.offsetHeight;screenX = window.screen.availWidth;}else {screenY = window.outerHeightscreenX = window.outerWidth}leftvar = (screenX - passW) / 2;rightvar = (screenY - passH) / 2;if (winName == 'comm') {leftprop = 10;topprop = 10;}else {if(navigator.appName == "Microsoft Internet Explorer") {leftprop = leftvar;topprop = rightvar + 60;}else {leftprop = (leftvar - pageXOffset);topprop = (rightvar - pageYOffset);}}properties = properties + ",left=" + leftprop;properties = properties + ",top=" + topprop;page = window.open(URL, winName , properties);page.opener.name = 'opener';}function MM_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_preloadImages() { //v3.0  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage() { //v3.0  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}function sendReq() { //test email  if ((document.form1.eMail.value == "") && (document.form1.username.value == "")) {      document.form1.username.focus();      status='Submit';      return;  }  else {      if (validEmail(document.form1.eMail.value, false) == true)          document.form1.submit();      else {          alert('Invalid email address detected.');          document.form1.eMail.focus();      }  }}function selectUnSelectAll(fieldName) {    var index, checkValue;    flag = document.msgform.checkALL.checked;    var len = document.msgform.elements.length;    checkValue = 0    for (index=0; index < len; index++) {        if (document.msgform.elements[index].name == fieldName) {            document.msgform.elements[index].checked=flag;            CCA(document.msgform.elements[index])            ++checkValue;        }    }    document.msgform.checkCount.value = checkValue;}function updatecheckCount(index) {    if (document.msgform.elements[index].checked)        document.msgform.checkCount.value = parseInt(document.msgform.checkCount.value) + 1;    else        document.msgform.checkCount.value = parseInt(document.msgform.checkCount.value) - 1;    CCA(document.msgform.elements[index])}function actMsg(cPage,sFlag,act) {    if (document.msgform.checkCount.value > 0) {        document.msgform.currentPage.value=cPage;        document.msgform.savedFlag.value=sFlag;        document.msgform.task.value=act;        document.msgform.submit();    }    else        status='';}function goSearch() {    document.form1.task.value = 'go';    document.form1.submit();}function Saverecord() { //validation    var themsg;    themsg = '';    if (document.SignUpDet.UserName.value == '')        themsg = 'Username is invalid. Username is missing.';    else if (String(document.SignUpDet.Password.value).length < 5)        themsg = 'Password is invalid. Minimum length for password.';    else if (document.SignUpDet.Password.value != document.SignUpDet.rePassword.value)        themsg = 'Password is invalid. Confirm password is different from password.';    else if (!(validEmail(document.SignUpDet.eMail.value,true)))        themsg = 'Email address is invalid or missing.';    else if (document.SignUpDet.country.value == '')        themsg = 'Country is invalid. Country is not selected.';    else if (!(document.SignUpDet.disclaimer.checked))        themsg = 'Please read and agree with the terms of use to proceed with sign-up.';    if (themsg == '')        document.SignUpDet.submit();    else        alert(themsg);}function UpdateProfile() {if ((document.editprofile.aboutme.value.length > 400) || (document.editprofile.interests.value.length > 400)) alert('About Me and Interests Field is only limit to have 400 characters each.');else document.editprofile.submit();}function UpdateAccount() {    var themsg;    themsg = '';    if (String(document.editprofile.Password.value).length < 5)        themsg = 'Password is invalid. Minimum length for password.';    else if (document.editprofile.Password.value != document.editprofile.rePassword.value)        themsg = 'Password is invalid. Confirm password is different from password.';    else if (!(validEmail(document.editprofile.eMail.value,true)))        themsg = 'Email address is invalid or missing.';    else if (document.editprofile.country.value == '')        themsg = 'Country is invalid. Country is not selected.';    if (themsg == '')        document.editprofile.submit();    else        alert(themsg);}function validEmail(i,emptyInvalid) {    var j, k    j = i.indexOf("@");    if (j < 2) {        if (((i == '') && (emptyInvalid == true)) || (i != '')) {            return false;        }    }    else {//        if (i.lastIndexOf(.)) {//            k = i.substring(j+1, j+3);//alert("k");//        )    }    return true;}function goLogin() {    if (document.loginform.u_name.value == '') {        document.loginform.u_name.value='your user name';        document.loginform.u_name.focus();    }    else        document.loginform.submit();}function saveSetting(passTask,passtbl,passField,passSel) {    var strLen, strVal;    if (passTask != 'email') {        if ((passTask != 'add') && (passSel.value == '')) {            alert('Please select a ' + passtbl);            passSel.focus();            return;        }        if ((passTask != 'del') && (passField.value == '')) {            alert('Please enter a value for ' + passtbl);            passField.focus();            return;        }        strVal = String(passSel.value);        strLen = strVal.length;        document.form1.theID.value = strVal.substring(strVal.lastIndexOf('_',strLen) + 1,strLen + 1);        document.form1.theValue.value = passField.value;    }    document.form1.task.value = passTask;    document.form1.tblInvolved.value = passtbl;    document.form1.submit();}function CCA(CB){if (CB.checked)hL(CB);elsedL(CB);}function hL(E){while (E.tagName!="TR"){E=E.parentElement;}E.className = "H";}function dL(E){while (E.tagName!="TR"){E=E.parentElement;}E.className = "";}