//popup
var newWin = null;
function closeWin(){
	if (newWin != null){
		if(!newWin.closed)
			newWin.close();
	}
}

function popUp(strURL,strType,strHeight,strWidth) {
	closeWin();
	var strOptions="";
	if (strType=="console") strOptions="resizable,scrollbars,height="+strHeight+",width="+strWidth;
	if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
	if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
	newWin = window.open(strURL, 'newWin', strOptions);
	newWin.focus();
}

var ie_fix = 0;
function send_form(poststr, div, url)	{
        document.getElementById(div).innerHTML='<div style=""><!-- --></div>';
				xmlHttp=GetXmlHttpObject();
				if (xmlHttp==null)
				{
					alert ("Browser does not support HTTP Request");
					return;
				}
				xmlHttp.onreadystatechange=function ()
					{
						if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
							{
								document.getElementById(div).innerHTML=xmlHttp.responseText;
								
								if(ie_fix==0)
								{
								window.scrollBy(0,1);
								ie_fix = 1;
								 }
								else {window.scrollBy(0,-1); ie_fix = 0;} 
							} 
					}

				xmlHttp.open('POST', url, true);
				xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
				xmlHttp.setRequestHeader("Content-length", poststr.length);
				xmlHttp.setRequestHeader("Connection", "close");
				xmlHttp.send(poststr);
			}
