﻿function launchTerms(openURL) {
    didClick = 1;
    popWin(openURL, "Terms", "800", "600", "yes", "");
}
function popWin(strURL, strWinName, intWidth, intHeight, blnScrollbars, strCustomParams) {

    if (intWidth == 26 && intHeight == 26) {
        intWidth = 600;
        intHeight = 600;
    }
    var intLeft = (screen.width - intWidth) / 2;
    var intTop = (screen.height - intHeight) / 2;
    var strSettings, intWin;

    strSettings = "height=" + intHeight + ",";
    strSettings += "width=" + intWidth + ",";
    strSettings += "top=" + intTop + ",";
    strSettings += "left=" + intLeft + ",";
    strSettings += "scrollbars=" + blnScrollbars + ",";
    strSettings += "status=no";
    if (strCustomParams && strCustomParams.length) {
        strSettings += "," + strCustomParams;
    }
    intWin = window.open(strURL, strWinName, strSettings);
    intWin.document.bgColor = "#000000";
}
function FileSelected(objId, setVal) {

    if (document.getElementById(objId))
        document.getElementById(objId).value = setVal;
    
}
function FileSelectedPicture(objId, setVal,ImageScr) {

    if (document.getElementById(objId))
        document.getElementById(objId).value = setVal;
    document.getElementById(ImageScr).src= "File:////" + document.getElementById(objId).value; 
    
}

function isNumberKey(evt)
{        
    var charCode = (evt.which) ? evt.which : event.keyCode    
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;
    else
        return true;
 
}

function MessagePermanentDeleteSong(remove,select)
    {
        var flage=0;
        re = new RegExp('Chk_selectDelete' + '$');
        for(i = 0; i < document.forms[0].elements.length; i++)
        {
            elm = document.forms[0].elements[i]
            
            if (elm.type == 'checkbox')
            {   
               
                if (re.test(elm.name)) 
                {
                
	                if(elm.checked == true)
	                {
	                    flage=1;
	                }
                }
            }
        }
        if(flage==1)
        {
            return confirm(remove);
            
        }
        else
        {
            alert(select);
            return false;
        }
    }
    
 function  Opennewwindow()
 {
     testwindow = window.open("BandMatesNotesHistroy.aspx","","left=300,top=80,scrollbars=yes,width=570,height=195");			
        testwindow.moveTo(310,280);
        return false;
        }