
function alertSize() {
  
  self.resizeTo(100,100);
  self.menubar=false;
  self.toolbar=false;
  self.addressbar = false;
  
//  var myWidth = 100, myHeight = 100;
//  if( typeof( window.innerWidth ) == 'number' ) {
//    //Non-IE
//    window.innerWidth = myWidth;
//    window.innerHeight = myHeight;
//  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//    //IE 6+ in 'standards compliant mode'
//    document.documentElement.clientWidth = myWidth;
//    document.documentElement.clientHeight = myHeight ;
//  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//    //IE 4 compatible
//    document.body.clientWidth = myWidth ;
//    document.body.clientHeight = myHeight ;
//  }
//  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
}
function Search_Click()
{

alert("Hi");
}

function Check_Radio(ival)
{
var doc = document.forms[0];
doc["RadioButton_"+ival].checked=true;
}

function Preview_Listen()
{
        //alertSize();
		var doc = document.forms[0];
	    //var lastChar = e.id.charAt(10);
		//var previewFile = doc["HF"+lastChar].value;
		
        var previewFile = doc["HF1"].value;
        //self.height=100;
        //self.width=100;
        document.objPlayer.filename=previewFile;
        document.objPlayer.showcontrols = "true";
}

function Preview_Listen2()
{
        
		var doc = document.forms[0];
        var previewFile = doc["ctl00_ContentPH1_HF1"].value;
        //var previewFile = doc["HF1"].value;
        //alert(previewFile);
        document.objPlayer.filename=previewFile;
        //document.objPlayer.embed.src=previewFile;
        document.objPlayer.showcontrols = "true";
        document.objPlayer.autoplay = "true";
}
function Preview_Listen3()
{
		var doc = document.forms[0];
        var previewFile = doc["ctl00_ContentPH1_HF1"].value;
        document.objPlayer.filename=previewFile;
        document.objPlayer.showcontrols = "true";
        document.objPlayer.animationstart ="true";
        document.objPlayer.autostart ="true";
}


function Alert(e)
{
alert (e);
}




function OnLoad(e)
{
  	if ((navigator.appName != "Microsoft Internet Explorer"))
	{
	var st = document.getElementsByTagName("link");
	st[2].href="";
	st[3].href="";
	}

}

function text_field_enter()
{
    if (event.keyCode == 13)
    {
        event.cancelBubble = true;
        event.returnValue = false;
//        var doc = document.forms[0];
//            if (!doc) {
//                doc = document.aspnetForm;}
//            var strSearch = doc["ctl00$txtSearch"].value;
         
//         if (strSearch!="")
//            {
               // alert(strSearch); 
               //window.location='SearchAdvanced.aspx?Action=SearchRequest&Value='+strSearch;
//           }               
    }
}



function onKeyUpMoveFocus(thisC, nextC, maxLen)
{
		//var key = window.event ? e.keyCode : e.which;
		var key = window.event;
		var keychar = String.fromCharCode(key);
	
		reg = /\d/;
		var bRet = true;
		var doc = document.forms[0];
		if (doc[thisC].value.length>=maxLen)
		 {
				var s1; var re; var ctrl = thisC;
                if (doc[thisC].value.length==3) {re = /^[0-9]{3}$/;}
                if (doc[thisC].value.length==4) {re = /^[0-9]{4}$/;}
                    
				s1 = doc[thisC].value;
				if ( !s1.match(re) )
				{
					alert ('Please enter valid number!');
					doc[thisC].value=""; doc[thisC].focus();
				}
                else
                    if (nextC!='' && bRet) {doc[nextC].focus(); }
	 	    }
}

function onkeyup()
{
   // alert("asd");
}

function clickEnter()
{
		var key = window.event;
		var keychar = String.fromCharCode(key);
        alert (Keychar);
        
//    if (event.keyCode == 13)
//    {
//        event.cancelBubble = true;
//        event.returnValue = false;
//        var theForm = document.forms['aspnetForm'];
//        if (!theForm) {
//            theForm = document.aspnetForm;

            //name="ctl00$imgBtn_Search" id="ctl00_imgBtn_Search
       // theForm.ctl00_imgBtn_Search.click();

//    }
}


function onFocus(thisC, nextC)
{

		//var key = window.event ? e.keyCode : e.which;
		var key = window.event;
		var keychar = String.fromCharCode(key);
		var evtobj=window.event; //? event : e
		var doc = document.forms[0];
		if (evtobj.shiftKey || keychar=='9')
			doc[thisC].value="";
		//doc[ctrl].focus(); 		

}

function Login_Click()
{
alert ("Login");
}

function make_visible(control)
{
    	var st = document.getElementById(control);
        st.src="App_Themes/Default/Images/loading.gif";
        //st1.focus();
        //alert("Hi");
}
function make_invisible(control)
{
    	//var st = document.getElementById(control);
    	var st = document.getElementById(control);
        st.visible = false;
}



function cursor_hand()
{
        var doc = document.forms[0];
       
            if (!doc) {
                doc = document.aspnetForm;}

    //var st=doc[control];
    doc.style.cursor = "hand";
    
}
function cursor_default()
{
        var doc = document.forms[0];
       
            if (!doc) {
                doc = document.aspnetForm;}

    //var st=doc[control];
    doc.style.cursor = "default";
    
}

function SetFocus(control)
{

//alert("hi");
  	var st = document.getElementById(control);
        st.focus();
		
}