﻿function getQueryVariable(variable) { 
var query = window.location.search.substring(1); 
var vars = query.split("&"); 
for (var i=0;i<vars.length;i++) { 
var pair = vars[i].split("="); 
if (pair[0] == variable) { 
return pair[1]; 
} 
} 
} 

function expandcollapse(obj)
{
var id="ctl00_ContentPlaceHolder1_"+obj.id;
if(document.getElementById(id).style.display=="inline"){
document.getElementById(id).style.display="none";
obj.style.background="url(/images/biao-2-2.gif)";
}else{
document.getElementById(id).style.display="inline";
obj.style.background="url(/images/biao-2.gif)";
}
}
function onUpdating(){

// get the update progress div
var pnlPopup = $get('ctl00_ContentPlaceHolder1_pnlPopup'); 

//  get the gridview element        
var gridView;
gridView = $get('ctl00_ContentPlaceHolder1_DataList2');
if(gridView==null)
gridView = $get('ctl00_ContentPlaceHolder1_DataList1');

// make it visible
pnlPopup.style.display = '';	    

// get the bounds of both the gridview and the progress div
var gridViewBounds = Sys.UI.DomElement.getBounds(gridView);
var pnlPopupBounds = Sys.UI.DomElement.getBounds(pnlPopup);
//  center of gridview

var x = gridViewBounds.x + Math.round(gridViewBounds.width / 2) - Math.round(pnlPopupBounds.width / 2);
var y = gridViewBounds.y;	    

//	set the progress element to this position
Sys.UI.DomElement.setLocation(pnlPopup, x, y);           


}

function onUpdated() {
// get the update progress div
var pnlPopup = $get('ctl00_ContentPlaceHolder1_pnlPopup'); 
// make it invisible
pnlPopup.style.display = 'none';
//  if(cornerOnload) cornerOnload(); if(isIE){addIECorners(); }else {addCorners();}
}   