﻿// JScript File

function ViewPopup(winname,url){    
    var popwidth=screen.availWidth - 300;
    var popheight=screen.availHeight - 300;
    var popleft = Math.round((screen.availWidth - popwidth) / 2);
    var poptop = Math.round((screen.availHeight - popheight) / 2);
	var args = 'toolbar=no,status=no,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,width='+ popwidth+',height='+ popheight+',left='+ popleft+',top='+ poptop;	
 window.open(url, winname, args);	

}
function ViewPopup2(winname,url){    
    var popwidth=screen.availWidth - 150;
    var popheight=screen.availHeight - 150;
    var popleft = Math.round((screen.availWidth - popwidth) / 2);
    var poptop = Math.round((screen.availHeight - popheight) / 2);
	var args = 'toolbar=no,status=no,menubar=no,location=no,directories=no,resizable=yes,scrollbars=yes,width='+ popwidth+',height='+ popheight+',left='+ popleft+',top='+ poptop;	
 window.open(url, winname, args);	

}

function ChangePic(PicPath)
{
var PicPath2=PicPath;
document.getElementById('FIMG').src= PicPath2 ;
 document.elements[FIMG].focus();	

}



var timerID = 0;
    var tStart  = null;


function UpdateTimer() {
   if(timerID) {
      clearTimeout(timerID);
      clockID  = 0;
   }
   

   if(!tStart)
      tStart   = new Date();

   var   tDate = new Date();
   var   tDiff = tDate.getTime() - tStart.getTime();

   tDate.setTime(tDiff);

 // document.theTimer.theTime.value = "" 
                        //   tDate.getMinutes() + ":" 
                        //  tDate.getSeconds();
                       document.getElementById('ctl00_ContentPlaceHolder1_DIV1').innerHtml='';
                       
       document.getElementById('ctl00_ContentPlaceHolder1_DIV1').innerHtml = 'saleh'; 
       //tDate.getMinutes() + ":" tDate.getSeconds();        
                                
//alert( document.getElementById('ctl00_ContentPlaceHolder1_DIV1').innerHtml );
   
   timerID = setTimeout("UpdateTimer()", 1000);
}


function Start() {

   tStart   = new Date();
  

   //document.theTimer.theTime.value = "00:00";

   timerID  = setTimeout("UpdateTimer()", 1000);
}


function Stop() {
   if(timerID) {
      clearTimeout(timerID);
      timerID  = 0;
   }

   tStart = null;
}


function Reset() {
   tStart = null;
   tStart   = new Date();
  

   //document.theTimer.theTime.value = "00:00";
 
}
function x()
{
alert('test');
}

