﻿function addLoadEvent(func) 
{
    var oldonload = window.onload;
    if (typeof window.onload != "function") 
    { window.onload = func; }  else 
    { window.onload = function() { if (oldonload) { oldonload(); } func(); } }
}
function initHeader(flashpath) {
	var so = new SWFObject(flashpath, "flashHeader", "900", "100", "8", "#FFFFFF");
	so.write("flashHeader");
}
function getExpireDate(days)
{
    var strUTC;
    Today = new Date();
    nomilli = Date.parse(Today);
    Today.setTime(nomilli+days*24*60*60*1000);
    UTCstring = Today.toUTCString();
    return strUTC;
}
function setLanguage(value)
{
    strLang = "_lang=" + escape(value) + ";EXPIRES=" + getExpireDate(365);
    document.cookie = strLang;
    return true;
}
function duplicateContent(sourceElem,targetElem)
{
    var source = document.getElementById(sourceElem);
    if (sourceElem)
    {
        var target = document.getElementById(targetElem);
        if (target) { target.innerHTML = source.innerHTML; }
    }
}
