﻿function PBookMark()
{
    BookMark();
    return false;
}
function popitup() {
	var url='Radio.aspx';
	var w=(screen.width)/2-270;
	var h=(screen.height)/2-200;
	var aa=window.open(url,'','top='+ h +',left='+ w +',width=627,height=450,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=1,resizable=no,dependent=no','');
	aa.focus();
}
function ShowAnimation() {
	var url='ShowAnimation.aspx';
	var w=(screen.width)/2;
	var h=(screen.height)/2;
	var aa=window.open(url,'','top='+ h +',left='+ w +',width=680,height=580,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=1,resizable=no,dependent=no','');
	aa.focus();
}
function popupmp3()
{
    var w=(screen.width)/2-300;
    var h=(screen.height)/2-200;
    var newwindow=window.open('Mp3Player.aspx','','height=300,top='+ h +',left='+ w +',width=600,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no','');
    newwindow.focus();
}
function Valid()
{
    txt1=document.getElementById('txtunm').value;
    txt2=document.getElementById('txtpwd').value;
    h1=document.getElementById('Hidden1').value;
    var exists=false;
    var mytool_array=h1.split("/");
    var part_num=0;
    while (part_num < mytool_array.length)
    {
        if(mytool_array[part_num]==txt1)
        {
            exists=true;
            break;
        }
        else
        {
        }
        part_num+=1;
    }
    if(exists==false)
    {
        window.document.getElementById('Label1').style.color='Red';
        return false;
    }
    else
    {
        window.document.getElementById('Label1').style.color='white';
    }
    if(txt1=="")
    {
        alert("Please username .");
        document.getElementById("txtunm").focus();
        return false;
    }
    if(txt2=="")
    {
        alert("Please enter password.");
        document.getElementById("txtpwd").focus();
        return false;
    }
    window.location="login_check.aspx?name="+txt1;
    val=session("name");
    if (val=="no")
    {
        alert("invalid");
    }
}
function test()
{
    window.open('http://www.userplane.com/im/launchDemo.cfm','calendarPopup','width=300,height=400,resizable=no,scrollbar=no,statusbar=no,menubar=no');
}
function SetScrollPosition()
{
    var div = document.getElementById('divMessages');
    var browser = navigator.appName;
    if(browser == 'Microsoft Internet Explorer')
    {
        div.scrollTop = div.scrollHeight+100000000000;
    }
    else if(browser == 'Netscape')
    {
        div.scrollTop = div.scrollHeight;
    }
}