function displaypost(lepost)
{
 var idpost=lepost.id;
 
	if (document.getElementById('openedpost').style.display == "none") {
		document.getElementById('openedpost').style.display = "block";

	}

    new Ajax.Updater('openedposts',themeURL+'getpost.php',
        {
    postBody: $H({'idpost':idpost}).toQueryString(),
    insertion: Insertion.Bottom,
    onComplete: function(requester){
                                    gotop('openedpost');
                                        $('openedpost').innerHTML = requester.responseText
                                            new Draggable('openedpost',{
                        handle: 'postbarre',
                        starteffect:function(obj){return true;},
                        endeffect:function(obj){return true;},
                     });

                           }
    }
    );
}

function displaypostnew(lepost)
{
 var idpost=lepost;
 
	if (document.getElementById('openedpost').style.display == "none") {
		document.getElementById('openedpost').style.display = "block";

	}

    new Ajax.Updater('openedposts',themeURL+'getpostnew.php',
        {
    postBody: $H({'idpost':idpost}).toQueryString(),
    insertion: Insertion.Bottom,
    onComplete: function(requester){
                                    gotop('openedpost');
                                        $('openedpost').innerHTML = requester.responseText
                                            new Draggable('openedpost',{
                        handle: 'postbarre',
                        starteffect:function(obj){return true;},
                        endeffect:function(obj){return true;},
                     });

                           }
    }
    );
}


function openpost(lelien)
{
window.location.href = lelien;
}


function removepost()
{
	document.getElementById('openedpost').style.display = "none" ;
	document.getElementById('boxpop').style.display = "none" ;
}

function gotop(idopenpost)
{
	$(idopenpost).style.zIndex=zindexmax;
	zindexmax++;
}




var themeURL = 'http://portfolio.youaretheweb.net/wp-content/themes/portfoliographic/';
var zindexmax=10;

function lafonctiondudebut()
{
	EffaceCookie('readposts');
}


Event.observe(window, 'load', lafonctiondudebut);