/* Vendor to add their own javascript here */

pdfDestDiovan='http://www.pharma.us.novartis.com/product/pi/pdf/diovan.pdf';
pdfDestDiovanHCT='http://www.pharma.us.novartis.com/product/pi/pdf/diovan_hct.pdf';
pdfDestExforge='http://www.pharma.us.novartis.com/product/pi/pdf/exforge.pdf';
pdfDestTekturna='http://www.pharma.us.novartis.com/product/pi/pdf/tekturna.pdf';
pdfDestTekturnaHCT='http://www.pharma.us.novartis.com/product/pi/pdf/tekturna_hct.pdf';

function pdfxfer_bpsz() {
  pdftemp=window.open( '/jsp/utils/pdfxfer/prepdf_bpsz.jsp', 'pdfxfer','height=440,width=440');
  pdftemp.focus();
}

function trim(stringToTrim) {
        return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function ltrim(stringToTrim) {
        return stringToTrim.replace(/^\s+/,"");
}
function rtrim(stringToTrim) {
        return stringToTrim.replace(/\s+$/,"");
}

function trimAndClean(value) {
   var temp = trim(value);

   var obj = /^(\s*)([\W\w]*)(\b\s*$)/;
   if (obj.test(temp)) { temp = temp.replace(obj, '$2'); }
   var obj = / +/g;
   temp = temp.replace(obj, " ");
   if (temp == " ") { temp = ""; }

   return temp;
}

function hideDiv(divName) {
	var div = document.getElementById(divName);
	var str = "";
	
	//alert("hiding " + divName);
	
	// clear dropdowns
	str = div.innerHTML;
	div.innerHTML = str.replace(/SELECTED/gi, " ");
	
	// clear radio buttons and checkboxes
	str = div.innerHTML;
	div.innerHTML = str.replace(/CHECKED/gi, " ");
	
	div.style.display = 'none';
}

function showDiv(divName) {
	var div = document.getElementById(divName);
	
	//alert("showing " + divName);
	div.style.display = '';
}

pdfDest='';
pdfTrackname='';
function bui_pdfxfer2( page,trackname ) {
  pdfDest=page;
  if (trackname != null) {
  	pdfTrackname="javascript: pageTracker._trackPageview('" + trackname + "');";
 }
  pdftemp=window.open( '/jsp/utils/pdfxfer/prepdf2.jsp', 'pdfxfer','height=287,width=420');
  pdftemp.focus();
}

function xter_win (page) {
window.open(page,'_blank', 'width=800, height=600, left=50, top=50, scrollbars=1, resizable=yes, status=yes');
}



