function doPrint(newsId,chanID,tmplid){openModal("http://www.clicrbs.com.br/fms/jsp/print_fms.jsp?newsID="+newsId+"&chanID="+chanID+"&tmplID="+tmplid,565,500,"PRINT",true);}

function addToFavorites(url,vtitle){window.external.AddFavorite(url,vtitle);}

function doFriend(){openModal("/jsp/send_friend.jsp?url="+escape(document.location),540,330,"FRIEND",false);}

 
 /* Função alterada para os jornais */
function linkImagem(p_width,p_height,p_file,p_author,p_copyright,p_legend, p_id, p_channel){

        pwidth = 400;
	if (p_height.length == 0)
		pheight = 450;
	else
		pheight = parseInt(p_height,10);	
	openModal("/jsp/rt.jsp?rootdir=/shared&width="+p_width+"&height="+p_height+"&file="+p_file+"&author="+escape(p_author)+"&copyright="+escape(p_copyright)+"&legend="+escape(p_legend)+"&id="+escape(p_id)+"&channel="+escape(p_channel)+"&template=1357.dwt",pwidth+100,pheight+100,"Fotos",1);
}
/* FIM Função alterada para os jornais */



function linkFlash(p_width,p_height,p_file,p_author,p_copyright,p_legend){
 var popup=null;
 if(!p_file.elements){

  popup = openModal('/clicstation/jsp/map.jsp?pfile=http://www.clicrbs.com.br/flash/'+p_file+'&pwidth='+p_width+'&pheight='+p_height,p_width,p_height,p_legend,true);

 }
 else{
  document.joker.p_comp.value=p_form.p_comp.value;
  document.joker.p_width.value=p_form.p_width.value;
  document.joker.p_height.value=p_form.p_height.value;
  document.joker.p_legend.value=p_form.p_legend.value;
  document.joker.p_author.value=p_form.p_author.value;
  document.joker.p_copyright.value=p_form.p_copyright.value;
  document.joker.p_type.value="F";
  var v_width=p_width+60;
  var v_heigh=p_height+100;
  popup=window.open("/rbs/html/popup.htm","RBS","resizable=yes,location=no,directories=no,status=no,toolbar=no,menubar=no,scrollbars=no,width="+v_width+",height="+v_height);
 }
}


function linkTrailer(nomevideo56,w56,h56,uf){
 var theURL, features;
 iw56=parseInt(w56);
 ih56=parseInt(h56);
 if (iw56<=347){iw56=348;}
 if (ih56<=359){ih56=360;}
 theURL="/clicstation/jsp/clicstation_trailers.jsp?strNomevideo56="+nomevideo56+"&w56="+iw56+"&h56="+ih56+"&struf="+uf;
 window.open(theURL,"ClicStationTreiler","width="+iw56+",height="+ih56);
}


function linkAudio(p_audio,uf){abrecs1('audio/'+p_audio,uf);}

function linkVideo(p_video,uf){abrecs1('video/'+p_video,uf);}

function linkEncode(p_video,uf){if(uf==null) uf='RS'; abrecs1(p_video,uf);}

function linkPopup(p_cat,p_tem,p_width,p_height){
 popup=window.open('/jsp/popup.jsp?catgid='+p_cat+'&template='+p_tem+'.dwt', 'PopUP', 'resizable=yes,location=no,directories=no,status=no,toolbar=no,menubar=no,scrollbars=no,width='+p_width+',height='+p_height);
}

function linkPdf(p_arq,p_width,p_height){
 popup=window.open('/pdf/'+p_arq, 'Pdf', 'resizable=yes,location=no,directories=no,status=no,toolbar=no,menubar=no,scrollbars=no,width='+p_width+',height='+p_height); 
}


function imprimir(){
 if( window.print() ) {
 return true;
 }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

