function preparePrintURL(url,language) {
var vUrl = url;

if (document.all.DocBaseResultPrint) {      

  v_action              =  'p_action='              + document.all.DocBaseResultPrint.p_action.value;
  v_start_row           =  'p_start_row='           + document.all.DocBaseResultPrint.p_start_row.value;
  v_text_cond           =  'p_text_cond='           + document.all.DocBaseResultPrint.p_text_cond.value;
  v_text_cond_operator  =  'p_text_cond_operator='  + document.all.DocBaseResultPrint.p_text_cond_operator.value;
  v_conform_operator    =  'p_conform_operator='    + document.all.DocBaseResultPrint.p_conform_operator.value;
  v_author              =  'p_author='              + document.all.DocBaseResultPrint.p_author.value;
  v_author_operator     =  'p_author_operator='     + document.all.DocBaseResultPrint.p_author_operator.value;
  v_title               =  'p_title='               + document.all.DocBaseResultPrint.p_title.value;
  v_title_operator      =  'p_title_operator='      + document.all.DocBaseResultPrint.p_title_operator.value;
  v_year                =  'p_year='                + document.all.DocBaseResultPrint.p_year.value;
  v_keyword             =  'p_keyword='             + document.all.DocBaseResultPrint.p_keyword.value;
  v_keyword_operator    =  'p_keyword_operator='    + document.all.DocBaseResultPrint.p_keyword_operator.value;
  v_jel_code            =  'p_jel_code='            + document.all.DocBaseResultPrint.p_jel_code.value;
  v_jel_code_operator   =  'p_jel_code_operator='   + document.all.DocBaseResultPrint.p_jel_code_operator.value;
  v_isbn                =  'p_isbn='                + document.all.DocBaseResultPrint.p_isbn.value;
  v_isbn_operator       =  'p_isbn_operator='       + document.all.DocBaseResultPrint.p_isbn_operator.value;
  v_source              =  'p_source='              + document.all.DocBaseResultPrint.p_source.value;
  v_source_operator     =  'p_source_operator='     + document.all.DocBaseResultPrint.p_source_operator.value;
  v_series              =  'p_series='              + document.all.DocBaseResultPrint.p_series.value;
  v_series_operator     =  'p_series_operator='     + document.all.DocBaseResultPrint.p_series_operator.value;
  v_max_rows            =  'p_max_rows='            + document.all.DocBaseResultPrint.p_max_rows.value;
  v_search              =  'p_search='              + document.all.DocBaseResultPrint.p_search.value;

  vUrl = 'http://www.cesifo-group.de/portal/page/portal/ifoHome/_DocBase_root/DocBase_intro/DocBase_10_Suche/_Suche_ErgebnisPRINTVERSION';
  vUrl = vUrl + '?'+v_action+'&'+v_start_row+'&'
                   +v_text_cond+'&'+v_text_cond_operator+'&'+v_conform_operator+'&'+v_author+'&'+v_author_operator+'&'
                   +v_title+'&'+v_title_operator+'&'+v_year+'&'+v_keyword+'&'+v_keyword_operator+'&'+v_jel_code+'&'+v_jel_code_operator+'&'
                   +v_isbn+'&'+v_isbn_operator+'&'+v_source+'&'+v_source_operator+'&'+v_series+'&'+v_series_operator+'&'+v_max_rows+'&'+v_search;
}


if (document.all.DiceResultPrint) {      

  v_start_row           =  'p_start_row='           + document.all.DiceResultPrint.p_start_row.value;
  v_end_row              = 'p_end_row='             + document.all.DiceResultPrint.p_end_row.value;
  v_max_rows            =  'p_max_rows='            + document.all.DiceResultPrint.p_max_rows.value;
  v_text_cond           =  'p_text_cond='           + document.all.DiceResultPrint.p_text_cond.value;
  v_title               =  'p_title='               + document.all.DiceResultPrint.p_title.value;
  v_jelcode             =  'p_jelcode='             + document.all.DiceResultPrint.p_jelcode.value;
  v_last_refyear_from   =  'p_last_refyear_from='   + document.all.DiceResultPrint.p_last_refyear_from.value;
  v_last_refyear_to     =  'p_last_refyear_to='     + document.all.DiceResultPrint.p_last_refyear_to.value;
  v_doctype             =  'p_doctype='             + document.all.DiceResultPrint.p_doctype.value;
  v_countries           =  'p_countries='           + document.all.DiceResultPrint.p_countries.value;
  v_institutions        =  'p_institutions='        + document.all.DiceResultPrint.p_institutions.value;
  v_checkbox_active     =  'p_checkbox_active='     + document.all.DiceResultPrint.p_checkbox_active.value;
  v_checkbox_archived   =  'p_checkbox_archived='   + document.all.DiceResultPrint.p_checkbox_archived.value;
  v_checkbox_TimeSeries =  'p_checkbox_TimeSeries=' + document.all.DiceResultPrint.p_checkbox_TimeSeries.value;

  vUrl = 'http://www.cesifo-group.de/portal/page/portal/ifoHome/a-winfo/d3iiv/_DICE_Results_Print';   
  vUrl = vUrl + '?'+v_start_row+'&'+v_end_row+'&'+v_max_rows+'&'+v_text_cond+'&'+v_title+'&'+v_jelcode+'&'
                   +v_last_refyear_from+'&'+v_last_refyear_to+'&'+v_doctype+'&'+v_countries+'&'+v_institutions+'&'
                   +v_checkbox_active+'&'+v_checkbox_archived+'&'+v_checkbox_TimeSeries;
}

vUrl = vUrl.replace(/\%/g, "%25");
// Reihenfolge nicht ändern!!!
vUrl = vUrl.replace(/:/g, "%3A");
vUrl = vUrl.replace(/\//g, "%2F");
vUrl = vUrl.replace(/&/g, "%26");
vUrl = vUrl.replace(/\=/g, "%3D");
vUrl = vUrl.replace(/,/g, "%2C");
vUrl = vUrl.replace(/\?/g, "%3F");
vUrl = vUrl.replace(/ /g, "%20");
vUrl = '/ifotools/print?_language='+language+'&_link='+vUrl;
//alert(vUrl);
//location.href = vUrl;
PRINT = window.open(vUrl,"PRINT","width=750, height=600, scrollbars=yes, menubar=yes");
PRINT.focus();
}

function noLink() {
var content = document.cookie;
if (content.search(/de-de/) != -1)
 { document.write('<a href="#" title="Druckversion ohne Verlinkung!">'); }
else
 { document.write('<a href="#" title="Print version without linking!">'); }
}

function header() {
var content = document.cookie;
if (content.search(/de-de/) != -1) 
 { var druck = 'Seite drucken '; var ende = 'Fenster schließen'; }
else
 { var druck = 'Print this page '; var ende = 'Close Window'; }
var table = '<body margin="5" bgcolor="#FFFFFF" onLoad="Text.decryptDocument();">';
table = table + '<table width="100%" cellspacing="0" cellpadding="0"><tr>';
table = table + '<td background="/print/printHeader.jpg" width="100%" height="70" align="right" valign="top">';
table = table + '<img src="/print/printCESifoLogo.jpg" vspace="5">';
table = table + '<p><span style="color:#777777;" class="nichtdrucken"><a href="javascript:window.print();" style="text-decoration:none; color:#777777;">' + druck + '</a>';
table = table + ' | <a href="javascript:window.close();" style="text-decoration:none; color:#777777;">' + ende + '</a>&nbsp;</span></p>';
table = table + '</td></tr></table><br>';
document.write(table);
}

function footer() {
var beginTab = '<br><table width="100%" cellspacing="0" cellpadding="0"><tr><td background="/print/printFooter.jpg" width="100%" height="45" align="right" valign="bottom">';
var endTab = '&nbsp;&nbsp;</td><td>&nbsp;&nbsp;</td></tr></table>';
var content = document.cookie;
var xx = content.search(/de-de/);
if (xx != -1)
document.write(beginTab + '© 1999-2011 ifo Institut' + endTab);
else
document.write(beginTab + '© 1999-2011 Ifo Institute' + endTab)
}

