function news_slideshow(){ var t=setTimeout("news_slideshow()",9000); move_next_news(); } var next_news = 4; function move_next_news(){ if(next_news<4){ next_news++; }else{ next_news = 0; } show_news(next_news); } var actual_news = 0; function show_news(news_id){ $('#viewer_item_'+actual_news).hide(); $('#viewer_item_'+news_id).show(); $('#viewer_link_'+actual_news).css('color', '#ffffff'); $('#viewer_link_'+news_id).css('color', '#FFFF33'); actual_news = news_id; next_news = news_id; } news_slideshow(); function change_news_photo(image_src){ var newImage = "url("+image_src+")"; document.getElementById('main_news_image').style.backgroundImage = newImage; } var newsletter_email = ''; function create_newsletter(ne){ newsletter_email = ne; } function send_newsletter(){ var err = false; var info = ''; var email = newsletter_email; if(email==''){ info = 'Enter your email address.
'; err = true; } if(!err){ $('#modal_err').html(''); jQuery.ajax({ type: "POST", url: 'http://www.ilike-photo.com/ajax_send_newsletter.php', data: "email="+email, success: function(msg){ if(msg=='ok'){ box.hide(); alert('Your email has been added to the database.'); }else{ alert(msg); } } }); }else{ alert(info); } return false; } var box; function open_newsletter(){ boxy_content = $('#newsletter_box').html(); box = new Boxy(boxy_content, {title:'Newsletter', closeable:true, center:true}); } function open_ftp(){ boxy_content = $('#ftp_box').html(); var box = new Boxy(boxy_content, {title:'Client Zone', closeable:true, center:true}); } function open_boxy(boxy_content, boxy_title){ boxy_content = '
'+boxy_content+'
'; var box = new Boxy(boxy_content, {title:boxy_title, closeable:true, center:true}); } function change_photo(image_src, image_info){ $('#phtg_gallery_image_info').html(image_info); var newImage = "url("+image_src+")"; document.getElementById('phtg_gallery_image').style.backgroundImage = newImage; } function hide_image_info(){ $('#phtg_gallery_image_info').hide(); } function show_image_info(){ $('#phtg_gallery_image_info').show(); } function go_to_url(url){ document.location.href= url; }