function openwindow(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};


function openwindow1(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup1','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};

function openwindow2(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup2','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};

function openwindow3(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup3','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};


function getRes(field)
{
	
	location.href="/"+field.name+"/"+field.value;
	
}



function validateEmail(f)
	{
		if(f.value!="")
		{
						var AtSym    = f.value.indexOf('@');
            var Period   = f.value.lastIndexOf('.');
            var Space    = f.value.indexOf(' ');
            var Length   = f.value.length - 1;
            if ((AtSym < 1) || (Period <= AtSym+1) || (Period == Length ) || (Space  != -1))
            {
            window.alert("Please enter Email in following format: user@domain.com");
            f.focus();
            return false;
            }
        }
		
	}
	
	
	
	 var start=0;
        var m=0;
        var s=0;
        var ms=0;
function startTime()
{
//var today=new Date()
//var h=today.getHours()
//var m=today.getMinutes()
//var s=today.getSeconds()
// add a zero in front of numbers<10
//s++;
ms++;
if(ms%30==0){s++;s=checkTime(s);}
if(ms>60){ms=0;}

if(s>60){m++;s=0;m=checkTime(m);}

ms=checkTime(ms);

document.getElementById('upload').innerHTML="<h4 align='center'>Uploading..<br/> <font style='background-color:yellow'>"+m+":"+s+":"+ms+"</font></h4>";
t=setTimeout('startTime()',1)
}

function checkTime(i)
{
if (i<10)
  {i="0" + i}
  return i
}





function startTime1()
{
//var today=new Date()
//var h=today.getHours()
//var m=today.getMinutes()
//var s=today.getSeconds()
// add a zero in front of numbers<10
//s++;
ms++;
if(ms%30==0){s++;s=checkTime(s);}
if(ms>60){ms=0;}

if(s>60){m++;s=0;m=checkTime(m);}

ms=checkTime(ms);

document.getElementById('upload1').innerHTML="<h4 align='center'>Uploading..<br/> <font style='background-color:yellow'>"+m+":"+s+":"+ms+"</font></h4>";
t=setTimeout('startTime1()',1)
}
