﻿function WinOpen(url,iwidth,iheight)
{
		msgWindow=window.open(url,"_blank","top=50,left=50,width="+iwidth+",height="+iheight+",menubar=no,location=no,toolbar=no,directories=no,status=no,resizable=no,scrollbars=no");
}

function WinOpenResizable(url, iwidth, iheight) {
    msgWindow = window.open(url, "_blank", "top=50,left=50,width=" + iwidth + ",height=" + iheight + ",menubar=no,location=no,toolbar=no,directories=no,status=no,resizable=yes,scrollbars=yes");
}

function WinOpenNoSize(url)
{
		msgWindow=window.open(url,"_blank","menubar=no,location=no,toolbar=no,directories=no,status=no,resizable=no,scrollbars=no");
}

function WinOpenNoSizeResizable(url)
{
		msgWindow=window.open(url,"_blank","menubar=no,location=no,toolbar=no,directories=no,status=no,resizable=yes,scrollbars=yes");
}

function addToFavorites()
{
	var url = window.location;
	var title = document.title;

	if(window.sidebar) 
          window.sidebar.addPanel(title,url,"");
	else if(window.opera && window.print){
          var elem = document.createElement('a');
          elem.setAttribute('href',url);
          elem.setAttribute('title',title);
          elem.setAttribute('rel','sidebar');
          elem.click();
	}
	else if (window.external)
	{
		window.external.AddFavorite(url, title);
	}
	else
	{
		alert("Sorry! Your browser doesn't support this function.");
	}
} 


function XmlHttpRequestText(url,method,stream)
{	
	try
	{
	
     		//xmlHttpRequest=isExplorer?new ActiveXObject(explorerXObject):new XMLHttpRequest();
     		
     		
			try {
				xmlHttpRequest = new XMLHttpRequest();
			}
			catch (e) {
				try {
					xmlHttpRequest = new ActiveXObject('MSXML2.XMLHTTP');
				}
				catch (e) {
					try {
						xmlHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');
					}
					catch (e) {
						return false;
					}
				}
			}
     		
     		xmlHttpRequest.open(method,url,false);
     		xmlHttpRequest.send(stream);
     		return xmlHttpRequest.responseText;
	}
	catch(e){}
	return '';
}

function AddAnchor(idprefix, jmprow, count) {
//bugfix: this is a replacement of the original addanchor function, because the old one does not exist anymore
}