//var raw_location = 'http://www.carcomplaints.com/Dodge/Avenger/1999/index.shtml';
var raw_location = new String(window.location);
var rawurlvars = raw_location.substr(raw_location.indexOf("http://")+7);
var url_array = rawurlvars.split('/');
var make = null;
var model = null;
var year = null;

if (url_array.length > 1)
{
	make = url_array[1].replace("_", " ").toUpperCase();
	model = url_array[2].replace("_", " ").toUpperCase();
	year = url_array[3];
}

document.write('\
<style type="text/css">\
#lemonfree-widget {font-family: arial, verdana, sans-serif; font-size:11px; width:238px; padding:4px; border:#a5a5a5 1px solid; background:#dededd url(\'http://www.lemonfree.com/widget/images/carcomplaints_widget_bg.gif\') repeat; margin:0; min-height:70px;}\
#lemonfree-widget p {margin:0; padding:0;}\
#lemonfree-widget a {color:#0000cc; text-decoration:underline;}\
#lemonfree-widget a:hover {color:#0000cc; text-decoration:none;}\
#lemonfree-widget table {margin:2px 0 0 0;}\
#lemonfree-widget input  {font-size: 10px; color: #000000; font-family:verdana, arial, sans-serif; background-color: #ffffff; font-weight: normal; width: 120px; border:#a5acb2 1px solid; padding:1px 1px 1px 2px;}\
#lemonfree-widget img a {border:none;}\
\
#lemonfree-widget .bold {font-weight:bold;}\
#lemonfree-widget .red {color:#d70505;}\
#lemonfree-widget .size10 {font-size:10px;}\
#lemonfree-widget .size9 {font-size:9px;}\
\
#lemonfree-widget .inittext\
{\
    width:116px;\
    padding:3px;\
    background-color:#ffffff;\
    font-weight:normal;\
    font-size:10px;\
}\
#lemonfree-widget div#make_subop\
{\
    font-size:10px;\
    border:1px solid #999999;\
    background-color:#ffffff;\
    z-index:100;\
    position:absolute;\
}\
#lemonfree-widget div#make_subop table\
{\
    background-color:#ffffff;\
}\
#lemonfree-widget div#model_subop\
{\
    font-size:10px;\
    border:1px solid #999999;\
    background-color:#ffffff;\
    z-index:10;\
    position:absolute;\
}\
#lemonfree-widget div#model_subop table\
{\
    background-color:#ffffff;\
}\
#lemonfree-widget td.layer_td\
{\
    font-size:10px;\
    background-color:#ffffff;\
    border:1px solid #ffffff;\
    padding-right:20px;\
}\
#lemonfree-widget td.layer_td:hover\
{\
    font-size:10px;\
    background-color:#FEFE6D;\
    border:1px solid #000000;\
}\
#lemonfree-widget .layer_td_hover\
{\
    font-size:10px;\
    background-color:#FEFE6D;\
    border:1px solid #000000;\
    padding-right:20px;\
    cursor: pointer;\
}\
</style>\
\
<p class="bold">Search Autos from <a href="http://www.lemonfree.com" style="color:#000000; text-decoration:none;">Lemon<span class="red">Free.Com</span></a></p>\
<form id="lemonfree_widget_form" method="post" action="http://www.lemonfree.com/widget/search_submit.php" target="_blank" autocomplete="off" style="display: inline;">\
<table width="100%" border="0" cellspacing="0" cellpadding="0">\
\
  <tr>\
    <td><p class="size10">Make:</p></td>\
    <td>\
        <input tabindex="0" type="text" id="make_txt" name="make_txt" onkeyup="fun=1;searchMakes(125);" onFocus="searchMakes(125);" onClick="this.value=\'\';searchMakes(125);" onKeyDown="fun=1;searchMakes(125);" onblur="getmakevalue()" value="'+(make != null ? make : '')+'">\
        <input type="hidden" id="make" name="make" value="">\
        <div id="make_op" style="position:relative; display:none">\
            <iframe id="make_iframe" style="width:0px; height:0px; position:absolute; display:block; background-color:#ffffff; z-index:100" frameborder=0 scrolling=no marginwidth=0 src="" marginheight=0></iframe>\
            <div id="make_subop"></div>\
        </div>\
    </td>\
    <td>&nbsp;</td>\
  </tr>\
  <tr>\
    <td><p class="size10">Model:</p></td>\
    <td>\
        <input tabindex="1" type="text" id="model_txt" name="model_txt" onkeyup="fun=2;searchModels(1);" onFocus="searchModels(125);" onClick="this.value=\'\';searchModels(125);" onKeyDown="fun=2;searchModels(125);" onblur="getmodelvalue()" style="width:120px;" value="'+(model != null ? model : '')+'">\
        <input type="hidden" id="model" name="model" value=""><br />\
        <div id="model_op" style="position:relative; display:none;">\
            <iframe id="model_iframe" style="width:0px; height:0px; position:absolute; display:block; background-color:#ffffff; z-index:0" frameborder=0 scrolling=no marginwidth=0 src="" marginheight=0></iframe>\
            <div id="model_subop"></div>\
        </div>\
    </td>\
\
      <td><a style="cursor: pointer;" onclick="widget_submit();"><img src="http://www.lemonfree.com/widget/images/carcomplaints_finditbutton.gif" alt="Find An Auto At LemonFree.com" border="0" title="Find An Auto At LemonFree.com" /></a></td>\
  </tr>\
</table>\
</form>\
');
