/*
CSS Browser Selector v0.3.5 (Feb 05, 2010)
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);
 



/*#############################
#########  GOOGLE ANALYTICS ########
#############################*/

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-6487228-1");
pageTracker._trackPageview();
} catch(err) {}



/*#############################
#########  ADD EVENT INDEX ########
#############################*/

function addevent() {
document.getElementById('index_schedulle').innerHTML="<form style='background: #fff; padding: 10px; padding-bottom: 0px;' method='post' action='admin_manager.php' enctype='multipart/form-data'>Data <select style=' height: 16px; font: 11px arial; color: #f00' name='day'><option>01</option><option>02</option><option>03</option><option>04</option><option>05</option><option>06</option><option>07</option><option>08</option><option>09</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option><option>24</option><option>25</option><option>26</option><option>27</option><option>28</option><option>29</option><option>30</option><option>31</option></select><select name='month' style=' height: 16px; font: 11px arial; color: #f00;'><option>01</option><option>02</option><option>03</option><option>04</option><option>05</option><option>06</option><option>07</option><option>08</option><option>09</option><option>10</option><option>11</option><option>12</option></select><select name='year' style=' height: 16px; font: 11px arial; color: #f00'><option>2008</option><option>2009</option></select>&nbsp;Hora <select style=' height: 16px; font: 11px arial; color: #f00' name='hour'><option>00</option><option>01</option><option>02</option><option>03</option><option>04</option><option>05</option><option>06</option><option>07</option><option>08</option><option>09</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option></select><br />Nome da Festa <input name='name' style='width: 160px; height: 16px; font: 11px arial; color: #f00; margin-left: 1px;' type='text' /><br />Local <input name='place' style='width: 160px; margin-left: 57px;  height: 16px; font: 11px arial; color: #f00' type='text' /><br />Cidade <input name='city' style='width: 134px; height: 16px; font: 11px arial; color: #f00;margin-left: 3px;' type='text' /> UF <select name='uf' style='height: 16px; font: 11px arial; color: #f00;'>      <option value='AC'>AC</option>      <option value='AL'>AL</option>      <option value='AM'>AM</option>      <option value='AP'>AP</option>      <option value='BA'>BA</option>      <option value='CE'>CE</option>      <option value='DF' selected>DF</option>      <option value='ES'>ES</option>      <option value='GO'>GO</option>      <option value='MA'>MA</option>      <option value='MG'>MG</option>      <option value='MT'>MT</option>      <option value='MS'>MS</option>      <optionvalue='PA'>PA</option>      <option value='PB'>PB</option>      <option value='PE'>PE</option>      <option value='PI'>PI</option>     <option value='PR'>PR</option>      <option value='RJ'>RJ</option>      <option value='RN'>RN</option>      <option value='RO'>RO</option>     <option value='RR'>RR</option>      <option value='RS'>RS</option>      <option value='SC'>SC</option>      <option value='SE'>SE</option>     <option value='SP'>SP</option>      <option value='TO'>TO</option>      </select><br />Informações <textarea name='info' style='width: 171px; margin-left:2px; height: 50px; font: 11px arial; color: #f00;'></textarea><br /><br />Flyer <input style='width: 170px; height: 20px; font: 11px arial; color: #f00'  name='foto' type='file' /><br /><br /><input type='submit' value='Cadastrar Evento' style='border: 1px solid #000; width: 275; font-weight: bold;' /></form>";
}

/*#############################
####  SHOW DETAILS INDEX SCHEDULLE ###
#############################*/

function showdetails(id,hour,minute,place,flyer) {
document.getElementById('info_schedule').innerHTML=hour +":"+ minute +" - "+ place;
document.getElementById('schedulle_mini').innerHTML="<a href="+ flyer +" target='blank'><img border='0' src="+ flyer +" /></a>";

}


function clear_details() {
document.getElementById('info_schedule').innerHTML="";
}

/*#############################
#######  DELETE COMMENT PHOTO ######
#############################*/

function deletecommentphoto(id_photo) {
var name=confirm("Certeza que quer apagar esse comentário?")
if (name==true)
{
location.href = "photo.actions.php?action=del_comment&id_photo="+ id_photo;
}
else
{
return false;
}
}

/*#############################
#######  DELETE COMMENT BLOG #######
#############################*/

function deletecommentblog(id_post) {
var name=confirm("Certeza que quer apagar esse comentário?")
if (name==true)
{
location.href = "admin.actions.php?action=del_comment&id_post="+ id_post;
}
else
{
return false;
}
}

/*#############################
########  LOGIN INDEX FORM #########
#############################*/

function login_index(){
document.getElementById('login_infos_empty').innerHTML="<form id='index_login' method='post' action='admin.actions.php'><input type='hidden' name='action' value='login' /><input type='hidden' name='ref' value='index.php' />Usuário <input type='text' name='login' />&nbsp;<br />Senha <input type='password' name='password' />&nbsp;<br /><button class='blue_button' type='submit'>Entrar</button>&nbsp;<br/> <a href='login.php?action=recover' title='Esqueci minha senha'><span style='font-size:10px;'>Esqueci minha senha</span>&nbsp;</a></form>";
}


/*#############################
#########  SEND PHOTO BOX #########	
#############################*/

function sendbox(id,thumb,photo,gallery){
document.getElementById('functions'+ id ).style.display="none";
document.getElementById('showsend'+ id ).innerHTML+="<div id='oie' style='visibility: visible; float: left;'><br /><div style='float: left; width: 140px;'><img src='photos/"+ thumb + "' /></div><div style='float: right; width:400px; text-align: left;'><form method='post' action='photo.actions.php' style='margin:0px'>Para: <input type='text' style='margin-left: 5px; width:350px;' name='emailfriend' /><br /><p style='margin:0px; font-size: 10px; color: #999;'>Para enviar a mais de um destinatário (máximo 5), separe cada endereço de e-mail com uma vírgula(,) ex: nome1@email.com.br , nome2@email.com.br</p><br />Seu Nome: <input type='text' style='width:209px;' name='name' /><br />Seu Email: <input type='text' style='margin-left: 3px; width:209px;' name='email' /><br /><br />Coment&aacute;rio: <textarea name='comment' style='width: 203px;'></textarea><br /><br /><input type='hidden' name='foto' value='http://www.fininhow.com.br/photos/"+ gallery + "/" + photo +"'><input type='image' src='_img/enviar.gif' style='border: 0px;' value='Enviar Foto'><br/><br/></form></div></div>";
}

/*#############################
#######  SEND COMMENT BOX #########	
#############################*/

function comment_box(gallery,id,thumb,id_user){
document.getElementById('functions'+ id ).style.display="none";
document.getElementById('old_comments'+ id ).style.display="table";
document.getElementById('login_comment_alert'+ id ).style.display="table";
document.getElementById('showcomment'+ id ).innerHTML+="<div id='oie' style='visibility: visible; float: left;'><br /><div style='float: left; width: 140px;'><img src='"+ thumb +"' /></div><div style='float: right; width:400px; text-align: left;'><form method='post' action='photo.actions.php' style='margin:0px'><strong>Deixar Coment&aacute;rio:</strong><br/> <textarea name='comment' style='width: 360px; height: 200px;'></textarea><br /><br /><input type='hidden' name='id_user' value='"+ id_user +"' /><input type='hidden' name='id_photo' value='"+ id +"' /><input type='hidden' name='action' value='send_comment'><input type='hidden' name='ref' value='show.partys.php?gallery="+ gallery +"#showphoto"+ id +"'><input type='image' src='_img/enviar.gif' style='border: 0px;' value='Enviar Foto'><br/><br/></form></div></div>";
}

/*#############################
#######  SHOW EVENTS DETAILS #######
#############################*/


function show_details() {
document.getElementById('info_schedule').innerHTML+="<p style='margin: 0px; font: 10px arial; text-align: left'>{section name=schedule loop=$schedule_day}{$schedule_id[schedule]} - {$schedule_place[schedule]}<br />{/section}</p>";
}

function clear_details() {
document.getElementById('info_schedule').innerHTML="";
}

/*#############################
######## BANNERS FLOAT LEFT #######
#############################*/

var posvertical="topo"

function menufloat()
    {
var startX = 1,
startY = 10;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
    function ml(id)
        {
            
            
       var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
       if(d.layers){el.style=el;}
          el.sP=function(x,y){this.style.left=x;this.style.top=y;};
          el.x = startX;
       if (posvertical=="rodape"){
          el.y = startY;}
       else{
          el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
          el.y -= startY;
            }
           return el;
          
        }
window.stayTopLeft=function()
{
   if (posvertical=="topo"){
      var pY = ns ? pageYOffset : document.body.scrollTop;
      ftlObj.y += (pY + startY - ftlObj.y)/2;
   }
   else{
      var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
      ftlObj.y += (pY - startY - ftlObj.y)/2;
   }
      ftlObj.sP(ftlObj.x, ftlObj.y);
      setTimeout("stayTopLeft()", 10);
}
    
      ftlObj = ml("fixacam");
      
      stayTopLeft();
   }
      menufloat();