function openPrevious()
	{
		try{
		var s = parent.frames["mainFrame"].document.forms["navigation"].previous.value;
		if(s=="javascript:void(0)")
			s="";
		parent.frames["mainFrame"].location.href = s;
		}
		catch(e){

		}
	}

function openNext()
	{		
		var s = parent.frames["mainFrame"].document.forms["navigation"].next.value;
		alert(s);
		parent.frames["mainFrame"].location.href = s;
	}
function Goback()
{
	
}

function display() {
//if(top.window.frames['mainFrame']){
	//alert("dfg");
if(null!=top.window.frames[2].document && top.window.frames[2].document != "null"){
  if (top.window.frames[2].document.getSelection) {
    var str = top.window.frames[2].document.getSelection();
	

  } else if (top.window.frames[2].document.selection && document.selection.createRange) {
    var range = top.window.frames[2].document.selection.createRange();
    var str = range.text;
	
  } else {
    var str = "Sorry, this is not possible with your browser.";
  }
  
  //top.window.frames['topFrame'].myForm.search.value= str;
  
  //top.window.frames['topFrame'].myForm.action="header.jsp";
  //alert(str+" " +top.window.frames['topFrame'].action);

  //top.window.frames['topFrame'].myForm.submit();
  }
}

//alert("came");
if (window.Event && null!=top.window.frames[2].document && top.window.frames[2].document != "null")	
	top.window.frames[2].document.captureEvents(Event.MOUSEUP);

if(null!=top.window.frames[2] && top.window.frames[2] != '')
	top.window.frames[2].document.onmouseup = display;


/*
//Selected text will be copied to the header frame
var text = "";
function getActiveText(e) { 
//alert("came");
// Sets text MSIE or Netscape active 
// text based on browser, puts text in form
text = (document.all) ? document.selection.createRange().text : document.getSelection();

parent.frames[0].document.theform.search.value = text;
return true;
}

document.onmouseup = getActiveText;
if (!document.all) document.captureEvents(Event.MOUSEUP);
*/
