function openWin(file,queryString, winWidth,winHeight,winStatus,winResizable,winName) {
	var wname= (winName) ? winName : null;
	var wwidth= (winWidth) ? winWidth : 400;
	var wheight= (winHeight) ? winHeight : 400;
	var qstring=(queryString) ? ("?"+queryString) : "";
	var wstatus= (winStatus) ? winStatus : "no";
	var wresizable= (winResizable) ? winResizable : "no";

	if (file) {
		window.open(file+qstring,wname,"height="+wheight+",width="+wwidth+",status="+wstatus+",scrollbars=yes,resizable="+wresizable+",toolbar=no,menubar=no,location=no",true);
		return false;
	}
	return false;
}

function openWinBasic(file,queryString,winWidth,winHeight,winName) {
	var wname= (winName) ? winName : null;
	var wheight=(winHeight)?winHeight:400;
	var wwidth=(winWidth)?winWidth:400;
	if (file) {
		window.open(file+"?"+queryString ,wname,"height="+wheight+",width="+wwidth+",status=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no",true);
		return false;
	}
}

function openWinResize(file,queryString,winWidth,winHeight,winName) {
	var wname= (winName) ? winName : null;
	var wheight=(winHeight)?winHeight:400;
	var wwidth=(winWidth)?winWidth:400;
	if (file) {
		window.open(file+"?"+queryString ,wname,"height="+wheight+",width="+wwidth+",status=yes,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no",true);
		return false;
	}
}

function closeWindow() {
	var parentObj;
	parentObj = window.opener;
	if (parentObj) {
		parentObj.location.reload();
	}
	window.close();
}

function submt(formObj){
	formObj.submit();
}
/*****filesize.asp**********/

function format_number(pnumber,decimals) 
{  
  if (isNaN(pnumber)) { return 0};  
  if (pnumber=='') { return 0};  
   
  var IsNegative=(parseInt(pnumber)<0); 
  if(IsNegative)pnumber=-pnumber; 

  var snum = new String(pnumber);  
  var sec = snum.split('.');  
  var whole = parseInt(sec[0]);  
  var result = '';  
  if(sec.length > 1){  
    var dec = new String(sec[1]);
    dec = parseInt(dec)/Math.pow(10,parseInt(dec.length-decimals-1)); 
	Math.round(dec); 
	dec = parseInt(dec)/10; 
	
	if(IsNegative) 
	{ 
	  var x = 0-dec; 
	      x = Math.round(x); 
	  dec = - x; 
	} 
	else 
	{ 
	      dec = Math.round(dec); 
	} 
	
	/* 
	 * If the number was rounded up from 9 to 10, and it was for 1 'decimal' 
	 * then we need to add 1 to the 'whole' and set the dec to 0. 
	 */ 
	if(dec==Math.pow(10, parseInt(decimals)))
	{ 
	  whole+=1; 
	  dec="0"; 
	} 
	
    dec = String(whole) + "." + String(dec);  
    var dot = dec.indexOf('.');  
    if(dot == -1){  
      dec += '.';  
      dot = dec.indexOf('.');  
    } 
	var l=parseInt(dot)+parseInt(decimals); 
    while(dec.length <= l) { dec += '0'; }  
    result = dec;  
  } else{  
    var dot;  
    var dec = new String(whole);  
    dec += '.';  
    dot = dec.indexOf('.');  
	var l=parseInt(dot)+parseInt(decimals); 
    while(dec.length <= l) { dec += '0'; }  
	result = dec;  
}  
  if(IsNegative)result="-"+result; 
  return result;  
}  

function fmtBytes(filesize) {
	var fs, unit;
	if (filesize > 1024 * 1024 * 1024) {
		fs = ( filesize / (1024*1024*1024) );
		unit = " GB";
	} else if (filesize > 1024 * 1024) {
		fs = ( filesize / (1024*1024) );
		unit = " MB";
	} else if (filesize > 1024) {
		fs = ( filesize / 1024);
		unit = " KB";
	} else {
		fs = filesize;
		unit = " bytes";
	}
	return format_number(fs, 2) + unit;
}

function getFileName(sUrl) { 
	var sPath, aPathElements, nLength; 
	sPath = new String(sUrl); 
	aPathElements = sPath.split("/"); 
	nLength = aPathElements.length; 
	return aPathElements[nLength-1]; 
} 


function visioninfo2(filename, filesize, filedate) {
	return visioninfo(getFileName(filename), "Size: " + fmtBytes(filesize), "Last Modified: " + filedate);
}