
function newwin(lnk,tpe){
	var link=lnk
	var type=tpe
	if(type==0){
	newwindow = window.open(window.location + link,'popup1','location=0,status=0,scrollbars=1,resizable=1,width=850,height=650');
	if (window.focus) {newwindow.focus()}
	return;
		}
	if(type==1){
	newwindow = window.open(link,'popup2','location=0,status=0,scrollbars=1,resizable=1,width=850,height=650');
	if (window.focus) {newwindow.focus()}
	return;
		}
	if(type==2){
	newwindow = window.open(link,'popup3','location=0,status=0,scrollbars=0,resizable=1,width=850,height=300,top=180,left=200');
	if (window.focus) {newwindow.focus()}
	return;
		}
}

//begin ajax Request
var xmlHttp
var v_name
var v_url
var end=1;
var ready=1;
function make_request(url,name){
	new Ajax.Request(url, {
		onSuccess: function(transport) {
			document.getElementById(name).innerHTML=transport.responseText;
  		}
	});
}

function make_request00(url,name){


	if(end==1){
		xmlHttp=GetXmlHttpObject();
		end=0;
	}

	ready=0;
	v_url=url;
	v_name=name;



	if (xmlHttp==null){
  		alert ("Your browser does not support AJAX!");
  		return;
	}

	xmlHttp.onreadystatechange=stateChanged00;
	xmlHttp.open("GET",v_url,true);
	xmlHttp.send(null);
}

function stateChanged00() {

	if (xmlHttp.readyState==4){
		ready=1;
		document.getElementById(v_name).innerHTML=xmlHttp.responseText;
		//alert(xmlHttp.responseText);

	}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}
//return ajax Request



function popup(link, name , width , height , top ,left ){
	newwindow = window.open( link , name , 'location=0,status=0,scrollbars=1,resizable=1,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left);
	if (window.focus) {newwindow.focus()}
}

function popup_00(link, name , width , height , top ,left ){
	newwindow = window.open( link , name , 'location=0,status=0,scrollbars=1,resizable=1,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left);
	if (window.focus) {newwindow.focus()}
}


function coordinates(event)
{
 x=event.screenX;
 y=event.screenY;
}


//onerror=handleErr;
var txt="";

function handleErr(msg,url,l){
	txt=" Pegasus JavaScript Error Handler.\n\n";
	txt+="Error: " + msg + "\n";
	txt+="URL: " + url + "\n";
	txt+="Line: " + l + "\n\n";
	txt+="Click OK to continue.\n\n";
	alert(txt);
	return true;
}





