function flash(w, h, path)
{ 
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">'
	+'<param name="movie" value="'+path+'" />'
	+'<param name="quality" value="high" />'
	+'<param name="menu" value="0" />'
	+'<param name="wmode" value="transparent" />'
	+'<embed src="'+path+'" width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="0" wmode="transparent"></embed>'
	+'</object>');
}

function showsubmenu(x)
{
	for(a=0; a<10; a++)
	{
		if(a == x)
		{
			document.getElementById('s'+a).style.display = 'block';
		}
		else
		{
			document.getElementById('s'+a).style.display = 'none';
		}
	}
}

function showsubmenuChild(x)
{
	document.getElementById('s'+x).style.display = 'block';
}

function setrawcookie (name, value, expires, path, domain, secure) {
    if (expires instanceof Date) {
        expires = expires.toGMTString();
    } else if (typeof(expires) == 'number') {
        expires = (new Date(+(new Date()) + expires * 1e3)).toGMTString();
    }

    var r = [name + "=" + value], s={}, i='';
    s = {expires: expires, path: path, domain: domain};
    for (i in s){
        s[i] && r.push(i + "=" + s[i]);
    }
    
    return secure && r.push("secure"), this.window.document.cookie = r.join(";"), true;
}


function setCookie(name, value, expires, path, domain, secure)
{
	return this.setrawcookie(name, encodeURIComponent(value), expires, path, domain, secure);
}

function getCookie(name)
{
    var theCookies = document.cookie.split(/[; ]+/);
    for (var i = 0 ; i < theCookies.length; i++) {
        var aName = theCookies[i].substring(0,theCookies[i].indexOf('='));
        if (aName == name) {
            var finded = theCookies[i].split('=');
			return finded[1];
        }
    }
}

function deleteCookie(name) {
    var aCookie = getCookie(name);
    if (aCookie) {
        document.cookie = aCookie + '; expires=Thu, 01-Jan-70 00:00:01 GMT';
        return name;
    }
}