var ns4 = (document.layers)? true:false
var ie4 = (document.all)? true:false

function pagetop(){
	//aTag = parent.Mmain.document.getElementsByTagName("a");
	parent.Mmain.document.body.scrollTop = "0";
	parent.Mmain.document.documentElement.scrollTop = "0";
}



function CareVisible2(){
//   document.getElementById('clo').style.display="none";
}
function printout(){
	loc = String(location);
    if(loc.match(/printout=false/)){
       window.print();
       CareVisible2();
    }

}

function printwin(){
   var printpage=parent.Mmain.location+"?printout=false";
pr=window.open(printpage,"pr","");
pr.focus();
}

function pagelink(str){
	var mainurl= parent.top.location.pathname;
	var lasturl;
	
	var UserAgent    = navigator.userAgent.toLowerCase();
	
	if (UserAgent.indexOf("win") > 0 && UserAgent.indexOf("msie 7") > 0 ) {
		lasturl=mainurl.lastIndexOf("/",mainurl.length);
	}
	
	else if (UserAgent.indexOf("win") > 0 && UserAgent.indexOf("msie") > 0 ) {
		lasturl=mainurl.lastIndexOf("\\",mainurl.length);
	}
	
	else {
		lasturl=mainurl.lastIndexOf("/",mainurl.length);
	}
	
	mainlink="/"+mainurl.substring((lasturl+1),(mainurl.length));
	
	parent.top.location.href = newlink(mainlink,str);
}

