﻿function openWithPostData(page,data)
{
var form = document.createElement('form');
form.setAttribute('action', page);
form.setAttribute('method', 'post');
for (var n in data)
{
    var inputvar = document.createElement('input');
    inputvar.setAttribute('type', 'hidden');
	inputvar.setAttribute('name', n);
    inputvar.setAttribute('value', data[n]);
    form.appendChild(inputvar);
 }
document.body.appendChild(form);
form.submit();
}

$(document).ready(function()
{
nomPage=document.location.pathname.substring(document.location.pathname.lastIndexOf("/")).split("/")[1]
var data = {};
data.url  = nomPage;
if(!parent.document.getElementById("id_iframe" )){
openWithPostData('index.aspx',data);
window.location.href = 'index.aspx';
};
});

function changeurl(str)
{
	document.getElementById("id_iframe").contentWindow.location.href = str;
	
    ///redimension iframe à 750px
    if(navigator.appName=="Microsoft Internet Explorer" )
    {
       // if(document.all) document.all.id_iframe.style.height = document.body.scrollHeight;
       // else
       // document.getElementById("id_iframe" ).style.height = 750;
	}  
    else
    {
       // document.getElementById("id_iframe" ).style.height = 750+"px";
	}
}
	
// always remove outlines
$("a").each(function()
{
	this.onmouseup = this.blur();
});
