function getElement(id){

  if(window.document[id]) return window.document[id];

    if(navigator.appName.indexOf("Microsoft Internet") == -1) {

    if (document.embeds && document.embeds[id]) return document.embeds[id];
    return document.getElementById(id);
  }
  
  return document.getElementById(id);
}

function setTypeOfMedia(value){

    var headlineMaker = getElement("headlineMaker");
    if(headlineMaker != null) headlineMaker.SetVariable("typeOfMedia", value); 
}

function setHeadline(value){

    var headlineMaker = getElement("headlineMaker");
    if(headlineMaker != null) headlineMaker.SetVariable("headlineText", value.toUpperCase()); 
}

function getHeadlineMaker(typeOfMedia, headlineText){

    window.document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"680px\" height=\"489px\" id=\"headlineMaker\">");
    window.document.write("<param name=\"movie\" value=\"/_media/flash/headlineMaker.swf\" />");
    window.document.write("<param name=\"quality\" value=\"high\" />");
    window.document.write("<param name=\"wmode\" value=\"transparent\" />");
    window.document.write("<param name=\"FlashVars\" value=\"typeOfMediaParam="+typeOfMedia+"&headlineTextParam="+headlineText.toUpperCase()+"\" />");
    window.document.write("<embed src=\"/_media/flash/headlineMaker.swf\" wmode=\"transparent\" FlashVars=\"typeOfMediaParam="+typeOfMedia+"&headlineTextParam="+headlineText.toUpperCase()+"\"  quality=\"high\" width=\"680px\" height=\"489px\" name=\"headlineMaker\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
    window.document.write("</object>");
}

function goback(){

	history.go(-1);
}