﻿function FocusControl(controlID)
{
    if (event.keyCode==13) 
    {
        document.form[0].controlID.focus();
        document.form[0].controlID.click();
    }
}


function OpenPopupPage (pageUrl, controlImage,controlText)
{
    var features="height=450,width=700,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes";
    popUp=window.open(pageUrl+'?controlImage='+controlImage+'&controlText='+controlText,'popupcal', features); 
}
		                         


function ChooseThumnail(controlID,fileName)
{
    document.forms[0].elements[controlID].src=fileName
     

}

function ShowHand(controlID)
{
    document.forms[0].elements[controlID].style.cursor="hand";
}

function OpenPopupContact ()
{
    
    var width = 440;
    var height = 460;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    
     var features="height="+height+",width="+width+",status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,left="+left+",top="+top+ "screenX=" + left + ",screenY=" + top;
     popUp=window.open('popup/Contact.aspx','popup', features); 
}

function OpenPopup(pageUrl,w,h)
{
     var width = w;
    var height = h;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));


    var features="height="+height+",width="+width+",status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,left="+left+",top="+top+ "screenX=" + left + ",screenY=" + top;
    window.open(pageUrl,'OpenPopup', features); 
    
    return false;
}	

