
if (top!= self) {
    top.location.href = location.href;
}
if (document.layers)
{
appear = 'show';
disappear = 'hide';
}
else if (document.all)
{
appear = 'visible';
disappear = 'hidden';
}


function go_back() {
	 history.back();
}
function MM_preloadImages() { //v3.0
        var d=document; if (d.images) {
            if (!d.MM_p) d.MM_p=new Array();
            var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for (i=0; i<a.length; i++)
                if (a[i].indexOf("#")!=0) {
                    d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
                }
        }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
        window.open(theURL,winName,features);
}

function showpic(picture) {
	var thispicture;
	if (document.layers)
	{
	thispicture = document.layers[picture];
	}
	else if (document.all)
	{
	thispicture = document.all(picture).style;
	}
	thispicture.visibility=appear;
}

function hidepic(picture) {
	var thispicture;
	if (document.layers)
	{
	thispicture = document.layers[picture];
	}
	else if (document.all)
	{
	thispicture = document.all(picture).style;
	}
	thispicture.visibility=disappear;
}
function open_href(reference, height, width) {
    height = height+20;
    width = width+20;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    window.open(reference, "Reference", "resizable=0, height="+height+",width="+width+", top="+top+", left="+left+", menubar=0");
}
function screenChange(width, height) {

   window.resizeTo(width, height);
   window.statusbar.visible = "false";
   window.scrollbars.visible = "false";
   window.toolbar.visible = "false";
   window.menubar.visible = "false";
   window.locationbar.visible = "false";
   window.directories.visible = "false";
   window.personalbar.visible = "false";

}
function go_to_bookmark(bookmark) {

    location.hash = bookmark;

}
function hasHtmlLink(elem) {
    re = /href=/;
    if (elem.value.match(re)) {
        alert("I'm sorry, but HTML content is not allowed in the search forms.\nPlease correct the error and try again");
        elem.focus();
        elem.select();
        return true;
    }
    else {
            return false;
    }
}

