﻿// JScript File


function ChangeImage(objImage, strImage) {
	objImage.src = strImage;
}


function openAttach(StrElement, StrKey,  strSubmit, strSr) {
	hauteur  = 600;
	largeur  = 950;
	var winl = 40;
	var wint = 40;
	winprops = 'height='+hauteur+',width='+largeur+',top='+wint+',left='+winl+',scrollbars=0,resizable=0';
	window.open( "/Upl/Upload_SelectFile.aspx?Element=" + StrElement + "&Key=" + StrKey + "&submit=" + strSubmit + "&sr=" + strSr, "popup", winprops);
}

function Highlight(e, className) {
	if (className==null) {
		className = "highlight";
	}
    overClassName = e.className;
    e.className = className;
}

function Unhighlight(e, className) {
	if (className==null) {
		className = overClassName;
	}
    e.className = className;
}

function Upl_ShowPopup()
{
    var divPopup = parent.document.getElementById("divPopup")
    
    divPopup.style.display = "";
    divPopup.style.left  = eval((screen.availWidth - 500)/2) + "px";

    if (document.all) { divPopup.style.top = document.documentElement.scrollTop + 100 ;}
    else {divPopup.style.top = eval(window.pageYOffset + 100) + "px" ;}
    
    parent.document.body.onclick = Upl_HidePopup;
}
function Upl_HidePopup()
{
    parent.document.getElementById("divPopup").style.display="none";

}
function Upl_attachFile(element, value, submit)
{
    parent.document.getElementById(element).value = value;
    if (submit!="")
    {
        parent.__doPostBack(submit, "");
    }
    var divPopup = parent.document.getElementById("divPopup")
    divPopup.style.display="none";
    
}

