var st = document.createElement("link");
st.setAttribute("rel","stylesheet");
st.setAttribute("href","/callme/callme.css");
document.body.appendChild(st);

document.write('<div id="callme"><a href="javascript:sh(\'callmeform\');"><img src="/callme/button.gif"></a></div>'+
'<div id="callmeform" class="hide-on"><h6>Заказать обратный звонок</h6><form action="/callme/" method="get" onSubmit="popform(this, \'join\')"><table cellpadding="0" cellspacing="0"><tr><td colspan="2">Ваше&nbsp;имя</td></tr><tr><td colspan="2"><input class="text" type="text" maxlength="45" style="width: 240px;" name="cname"></td></tr><tr><td colspan="2">Ваш&nbsp;телефон</td><tr><td><input class="text" type="text" size="5" value="+7 " maxlength="7" name="ccode"></td><td width="100%"><input class="text" type="text" maxlength="35" name="cphone"></td></tr><tr><td colspan="2"><input type="submit" value="Перезвоните мне" class="submit"></td></tr></table></form></div>');

function sh(id){
    var control = document.getElementById(id);
    if(control.className.split(" ")[0]=="hide-on"){
        control.className=control.className.replace("hide-on", "hide-off");
    } else {
        control.className=control.className.replace("hide-off", "hide-on");
    }
}

function popform(myform, callme)
{
    if (! window.focus)return true;
        window.open('', callme, 'height=200,width=400,scrollbars=yes');
        myform.target=callme;
return true;
}
