// JavaScript Document


// *********************************** Tumb VIDEO START

function img_tumb_video()
{
    //Create Page Video YouTube
	var s = "";
	s +="<p><b>Slideshow: artistul si lucrarile</b></p></br>"
    s += "<div class='tumb_video'><object width='350' height='288'><param name='movie' value='http://www.youtube.com/v/nKgb-8hNsR4&hl=en&fs=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/nKgb-8hNsR4&hl=en&fs=1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='350' height='288'></embed></object></div>";
    document.getElementById('news_current_content').innerHTML = s;
}


// *********************************** Tumb VIDEO STOP

// *********************************** CONTACT START

function contact_tip()
{
    $("#txt_tip").keypress(function(){
        return false;
    });
    $("#txt_tip").focus(function(){
        $("#tip").css("display","block");
    });
    $("#txt_tip").blur(function(){
        setTimeout(function(){$("#tip").css("display","none");},100);
    });
    $("#tip_btn").click(function(){
        if ($("#tip").css("display") == "block")
            $("#tip").css("display","none");
        else
            $("#tip").css("display","block");
    });
    $("#tip li").click(function(){
        var t = $(this).text();
        document.getElementById("txt_tip").value = t;
        $("#tip").css("display","none");
    });

}

// *********************************** CONTACT END

// *********************************** PRESA START

var pages = new Array();
pages[0] = "<span style='color:#0033FF; margin-top:10px;'>&nbsp;iunie&nbsp;2008</span>";
pages[0] += "<a href='articole/articolul_3_pagina1.html' title='Ludic. Picteaza in culori vii si imagini vesele peretii camerelor copiilor - Stefan Postol le face cunostinta...'>+&nbsp;Ludic. Picteaza in culori vii si imagini vesele peretii camerelor copiilor...</a>";
pages[0] += "<a href='articole/articolul_2_pagina1.html' title='Stefan Postol &ndash; un pictor pentru copilul tau'>+&nbsp;Stefan Postol &ndash; un pictor pentru copilul tau</a>";
pages[0] += "<a href='articole/articolul_1_pagina1.html' title='Reintoarcere in copilarie'>+&nbsp;Reintoarcere in copilarie</a>";
pages[1] = "<span style='color:#0033FF; margin-top:10px;'>&nbsp;august&nbsp;2009</span>";
pages[1] += "<a href='articole/articolul_6_pagina1.html' title='Asa fac ei bani la mare'>+&nbsp;Asa fac ei bani la mare</a>";
pages[1] += "<span style='color:#0033FF; margin-top:10px;'>&nbsp;mai&nbsp;2009</span>";
pages[1] += "<a href='articole/articolul_5_pagina1.html' title='Stefan Postol picteaza camera copilului'>+&nbsp;Oradea: Stefan Postol picteaza camera copilului</a>";
pages[1] += "<span style='color:#0033FF; margin-top:10px;'>&nbsp;martie&nbsp;2009</span>";
pages[1] += "<a href='articole/articolul_4_pagina1.html' title='Donald kacsa &eacute;s Miki eg&eacute;r a gyerekszoba fal&aacute;n'>+&nbsp;Donald kacsa &eacute;s Miki eg&eacute;r a gyerekszoba fal&aacute;n</a>";
var current_presa_page = 0;

function updatePresa()
{
    $("#presa_list").html(pages[current_presa_page]);
    if (current_presa_page == 0)
    {
        $("#presa_go_right").animate({opacity:0.3},1);
        $("#presa_go_left").animate({opacity:1.0},1);
    }
    else
        if (current_presa_page == pages.length - 1)
        {
            $("#presa_go_right").animate({opacity:1.0},1);
            $("#presa_go_left").animate({opacity:0.3},1);
        }
        else
        {
            $("#presa_go_right").animate({opacity:1.0},1);
            $("#presa_go_left").animate({opacity:1.0},1);
        }
}

function doPresaPages(loc)
{
    // if window.location is [root]/articole, fix the href of the anchors
    if (loc == "articole")
        for (var i = 0; i < pages.length; i++)
            while (pages[i].indexOf("'articole/") > -1)
                pages[i] = pages[i].replace("'articole/","'");
    //init: fill the articles div with the latest articles
    $("#presa_list").html(pages[pages.length - 1]);
    current_presa_page = pages.length - 1;
    $("#presa_go_left").animate({opacity:0.3},1);
    
    // see previous articles
    $("#presa_go_left").click(function(){
        if (current_presa_page < pages.length - 1)
        {
            current_presa_page++;
            updatePresa();
        }
        return false;
    });
    // see next articles
    $("#presa_go_right").click(function(){
        if (current_presa_page > 0)
        {
            current_presa_page--;
            updatePresa();
        }
        return false;
    });
}
// *********************************** PRESA END

