//     ||    ||  ||    ||  ||  ||        ------------------        ||    ||  ||    ||  ||  ||     //
//     ||    ||  ||    ||    ||           PRINTER FRIENDLY         ||    ||  ||    ||    ||       //
//     ||||  ||  ||||  ||||  ||          ------------------        ||||  ||  ||||  ||||  ||       //

// This function opens the current document in a new window and names this new window "printable"
// document.location	= url of the document which is identical to the url of the master document
// printable		= name of the new window
// height		= height in pixels of the new window
// width		= width in pixels of the new window
// toolbar		= 0 for no toolbar, 1 for a toolbar
// location		= 0 for no location field, 1 for a location field
// directories		= 0 for no directories bar, 1 for directories bar
// status		= 0 for no status bar, 1 for a status bar
// scrollBars		= 0 for no scroll bar, 1 for a scrollbar
// resizable		= 0 for no permission to resize the new window, 1 for permission to resize it
function Parameters(){
	var parameters=[], sequ='=', scol=':', sand='&';
	if (window.location.search.length>1){
		var str = window.location.search.substr(1);
		if (str.indexOf(escape(sand))>=0) sand = escape(sand); // ha az & jelet átfordította %26-ra, akkor azzal dolgozik
		parameters = str.split(sand);
		for(var i=0;i<parameters.length;i++){
			if ((i1=parameters[i].indexOf(sequ))>=0){ // csak az első egyenlőségjelet veszi figyelembe
				var nev = parameters[i].substr(0,i1);
				var ert = parameters[i].substr(i1+1);
				if (isNaN(ert)) ert = AddLimesToString(ert);
				eval(nev+sequ+ert); // ebben az esetben az értékadást elvégzi
			}
		}
	}
	return parameters[0];
}


function printer_friendly() {

	var printer_file="RO_Strattera_Printerfriendly.jsp?" + Parameters();;
	window.open(printer_file ,"printable","height=500,width=700,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=0");
}

// This condition checks if the window's name is "printable" and if the condition is evaluated to "true",
// it writes the needed css rules

if (window.name=="printable") document.write("<style>.hide{display:none}.show_block{display:block}.show_inline{display:inline}</style>");