function showVoken(vokId, flag) {
	
	div1 = new getObj(vokId);
	//div2 = new getObj("screen1");
	
	if (flag) {
		div1.style.display= 'block';
		//div2.style.display= 'block';
		
		// Postion
		/*resizeScreen();
		
		window.onresize = resizeScreen;*/
		
	} else {
		div1.style.display= 'none';
		//div2.style.display= 'none';
	}
	
}

//
function close_alert() {
	obj = new getObj("alert1");
	obj.style.display = "none";
}
//

function resizeScreen() {
	div2 = new getObj("screen1");
	
	dim = new browserDim();
	
	div2.style.width = dim.width;
	div2.style.height = dim.height;
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function browserDim() {
	if (window.innerWidth) {
		this.width = window.innerWidth;
		this.height = window.innerHeight;
	} else if (document.all) {
		this.width = document.body.clientWidth;
		this.height = document.body.clientHeight;
	}
}

// COOKIES

function setCookie( name, value, expires, path, domain, secure ) 
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}
		

/**
 * Gets the value of the specified cookie.
 *
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

// this deletes the cookie when called
function deleteCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

function fEmbedFlash(sPath, sWidth, sHeight, sParams) {

	var str 			= '';
	
	var params_str = "";
	if (sParams != "") {
		defaultParams = defaultParams + ',' + sParams;
	}
	arr_params = defaultParams.split(",");
	for (i = 0; i< arr_params.length; i+=2) {
		params_str += ' ' + arr_params[i] + '=\"' + arr_params[i+1] + '\"';
	}
	
	str += '<object classid=\"' + classid + '"\" codebase=\"' + codebase + '\" width=\"' + sWidth + '\" height=\"' + sHeight + '\">';
	str += '<param name=\"movie\" value=\"' + sPath + '\">';
	
	for (i = 0; i < arr_params.length; i+=2) {	
		str += '<param name=\"' + arr_params[i] + '\" value=\"' + arr_params[i+1]+ '\">';
	}
	str += '<embed src=\"' + sPath + '\" pluginspage=\"' + pluginspage+ '\" type=\"application/x-shockwave-flash\" width=\"' + sWidth + '\" height=\"' + sHeight + '\" ' + params_str + '></embed>';
	str += '</object>';
	document.write(str);
}