function goTo(url) {
    document.location=url;
}
function swithToEditMode(){
     var theUrl = window.location.href;

     var pos = theUrl.indexOf("/op/edit");
     if (pos == -1) {
        pos = theUrl.indexOf("/op/");
        if ( pos == -1 ){
            pos = theUrl.indexOf("/pid/");
            if ( pos != -1 ){
                theUrl = theUrl.substring( 0, pos ) + "/op/edit" + theUrl.substring( pos );
            }
         } else {
            theUrl = theUrl.substring( 0, pos ) + "/op/edit/oldop/" + theUrl.substring( pos + 4 );
         }
         //alert(theUrl);
         window.location.href = theUrl;
    }
}
function checkMaxPageItems(){
	if ( document.searchpager && document.searchpager.maxPageItems
		&& document.searchpager.maxPageItems.selectedIndex != -1 ){
		document.searchForm.maxPageItems.value = document.searchpager.maxPageItems.options[document.searchpager.maxPageItems.selectedIndex].value;
	}
}

function FloatBottom(elementname)
{
	var startX = 00, startY = 14;
	var d = document;
	function ml(id)
	{
		var scrOfX = 0, scrOfY = 0;
		if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		}

		var myWidth = 0, myHeight = 0;
		if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
		el.x = startX; 
		el.y = myHeight + scrOfY;
		el.y -= startY;
		return el;
	}
	window.stayBottomLeft=function() {
		var scrOfX = 0, scrOfY = 0;
		if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		}

		var myWidth = 0, myHeight = 0;
		if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}

		var pY = myHeight + scrOfY;
		fblObj.y += (pY - startY - fblObj.y);
		fblObj.sP(fblObj.x, fblObj.y);
		setTimeout("stayBottomLeft()", 40);
	}
	fblObj = ml(elementname);
	stayBottomLeft();
}
