var badgeCode='<div style="width:{width}px;height:{height}px;border:2px solid #{borderColor};background:#{backGroundColor};font-family:Arial, Helvetica, sans-serif;font-size:{textSize}px;color:#{textColor};">'
badgeCode=badgeCode+'<div style="background-color:#FFF;width:{width}px;border-bottom:1px #B2D2DD solid;"><center><a href="http://www.medindia.net/healthnetwork/default.aspx?util=badge" style="text-decoration:none;">';
badgeCode=badgeCode+'<img src="http://www.medindia.net/healthnetwork/images/badges/logo.gif" alt="Medindia Health Network" border="0"/></a></center></div>';
badgeCode=badgeCode+'<div style="padding-left:5px">{text}</div>';
badgeCode=badgeCode+'<div style="margin-top:5px;text-align:center;{extraStyle}"><a href="http://www.medindia.net/healthnetwork/login/register.aspx?util=badge" style="font-size:13px;">';
var medBadgewidth,medBadgeheight,medBadgetextSize;
switch(medBadgeSize){
    case "180x150":
    {
    medBadgewidth=180;
    medBadgeheight=150;
    medBadgetext="<div style='border-bottom:1px #{borderColor} solid;width:170px'><center>I’m a member of <br><big><b>Medindia Health Network</b></big></center></div>Create ‘Health Revolution’ make<br>the World healthier place to live.";
    medBadgetextSize=10;
    badgeCode=badgeCode+'<span style="color:#'+medBadgeLinkColor+';"><b>Join Now</b></span>';
    badgeCode=badgeCode.replace(/{extraStyle}/g,"padding-top:5px;");

    break;
    }
    case "200x200":
    {
    medBadgewidth=200;
    medBadgeheight=200;
    medBadgetext="<div style='border-bottom:1px #{borderColor} solid;width:190px;padding-bottom:5px;margin-bottom:5px;'><center>I’m a member of<br><big><b>Medindia Health Network</b></big></div>Create ‘Health Revolution’ make the World healthier place to live.</center>";
    medBadgetextSize=13;
    badgeCode=badgeCode+'<img src="http://www.medindia.net/healthnetwork/images/badges/join_now.jpg" alt="Join Now" border="0"/>';
    badgeCode=badgeCode.replace(/{extraStyle}/g,"padding-top:15px;");

    break;
    }
    case "250x250":
    {
    medBadgewidth=250;
    medBadgeheight=250;
    medBadgetext="<div style='border-bottom:1px #{borderColor} solid;width:240px;padding-bottom:5px;margin-bottom:5px;' id='topText'><center>I’m a member of <br><big><b>Medindia<br>Health Network</b></big></center></div><center>Create ‘Health Revolution’ make<br>the World healthier place to live.</center>";
    medBadgetextSize=17;
    badgeCode=badgeCode+'<img src="http://www.medindia.net/healthnetwork/images/badges/join_now.jpg" alt="Join Now" border="0"/>';
    badgeCode=badgeCode.replace(/{extraStyle}/g,"padding-top:10px;");
    break;
    }
    case "300x250":
    {
    medBadgewidth=300;
    medBadgeheight=250;
    medBadgetext="<div style='border-bottom:1px #{borderColor} solid;width:290px;padding-bottom:5px;margin-bottom:5px;' id='topText'><center>I’m a member of <br><big><b>Medindia<br>Health Network</b></big></center></div><center>Create ‘Health Revolution’ make<br>the World healthier place to live.</center>";
    medBadgetextSize=18;
    badgeCode=badgeCode+'<img src="http://www.medindia.net/healthnetwork/images/badges/join_now.jpg" alt="Join Now" border="0"/>';
    badgeCode=badgeCode.replace(/{extraStyle}/g,"padding-top:10px;");
    break;
    }
    default:
    {
    medBadgewidth=200;
    medBadgeheight=200;
    medBadgetext="<div style='border-bottom:1px #{borderColor} solid;width:190px;padding-bottom:5px;margin-bottom:5px;'><center>I’m a member of<br><big><b>Medindia Health Network</b></big></div>Create ‘Health Revolution’ make the World healthier place to live.</center>";
    medBadgetextSize=13;
    badgeCode=badgeCode+'<img src="http://www.medindia.net/healthnetwork/images/badges/join_now.jpg" alt="Join Now" border="0"/>';
    badgeCode=badgeCode.replace(/{extraStyle}/g,"padding-top:15px;");

    break;
    }
}
badgeCode=badgeCode+'</a></div></div>';
badgeCode=badgeCode.replace(/{text}/g,medBadgetext);
badgeCode=badgeCode.replace(/{backGroundColor}/g,medBadgeBack);
badgeCode=badgeCode.replace(/{borderColor}/g,medBadgeBorder);
badgeCode=badgeCode.replace(/{width}/g,medBadgewidth);
badgeCode=badgeCode.replace(/{height}/g,medBadgeheight);
badgeCode=badgeCode.replace(/{textSize}/g,medBadgetextSize);
badgeCode=badgeCode.replace(/{textColor}/g,medBadgeForeColor);
document.write(badgeCode);