var Feedeliza={init:function(){$("formulario").getElements("input[type=text],select").each(function(a){a.addEvent("change",function(){Feedeliza.getCode(true)})});$("formulario").getElements("input[name=formato]").each(function(a){a.addEvent("change",function(){Feedeliza.getCode(false)})});$$(".rain").each(function(b,a){new MooRainbow(b,{id:"color"+a,wheel:true,imgPath:"/images/moorainbow/",onChange:function(c){if(c.hex.replace){$(b.id.replace("img","")).value=c.hex.replace("#","")}Feedeliza.getCode(true)},onComplete:function(c){Feedeliza.getCode(true)}})});$("formulario").addEvent("submit",function(){return false})},getCode:function(d){required=$($("tab").value).value;if(required==""){return false}var c=["http://bitacoras.com/feedeliza/"+$("tab").value,required];if($("tab").value=="geo"&&$("ciudad").value!=""){c.push($("ciudad").value)}var a=[];var b=["fondo","enlaces","texto","titulo","blog"];b.each(function(e){c.push(e);c.push($(e).value)});if(d==true){example=c.join("/")+"/elementos/3/ancho/200/";example+=a.join("/")+"/formato/html";$("iframe-example").set("src",example)}b=["elementos","ancho"];b.each(function(e){c.push(e);c.push($(e).value)});c=c.join("/")+"/"+a.join("/");format=$("formulario").getElements("input[name=formato]:checked").get("value");c+="formato/"+format;if(format=="js"){$("codigo-feedeliza").set("value",'<script src="'+c+'" type="text/javascript" charset="utf-8"><\/script>')}else{$("codigo-feedeliza").set("value",c)}return true}};window.addEvent("domready",Feedeliza.init);