function get_id_num(a,b) {
	k_a = a.length;
	k_b = b.length;
	m = a.substr((k_b),(k_a-1));
	return m;
}

function move_to(a) {
	document.location.href=a;
}

function preload_images()
{
	var a = preload_images.arguments;
	var j = a.length;
	var img_new = new Array;
	for(i=0;i<j;i++)
	{
		img_new[i] = new Image;
		img_new[i].src = a[i];
	}
}

function op_win_centre(addr,w,h)
{
	var sc_h = screen.availHeight;
	var sc_w = screen.availWidth;
	
	sc_h = parseInt((sc_h - h)/2);
	sc_w = parseInt((sc_w - w)/2);
	
	if ((navigator.userAgent.indexOf('Opera') != -1)&&(navigator.userAgent.indexOf('MSIE') != -1))
	{
		sc_h = sc_h - ((screen.availHeight - document.body.clientHeight) - 29);
	}
	
	var margins="left="+sc_w+",top="+sc_h;

	window.open(addr,"","toolbars=0,scrollbars=0,directories=0,resizable=1,status=0,width=" + w + ",height=" + h + "," + margins);
}

function label_imit(a)
{
	b = document.getElementById(a);
	if(b.checked == true)
	{
		b.checked = false;
	}
	else
	{
		b.checked = true;
	}
}

function insertFlash(width,height,path,bgcolor,align,id)
{ 
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'" id="'+id+'" align="middle">'); 
    document.write('<param name="allowScriptAccess" value="sameDomain" />'); 
    document.write('<param name="movie" value="'+path+'" />'); 
    document.write('<param name="quality" value="high" />');
	if(bgcolor)
	{
		document.write('<param name="bgcolor" value="'+bgcolor+'" />'); 
	}
	else
	{
		document.write('<param name="wmode" value="transparent" />'); 
	}
    document.write('<embed src="'+path+'" quality="high" width="'+width+'" height="'+height+'" name="'+id+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" '); 
	if(bgcolor)
	{
		document.write('bgcolor="' + bgcolor + '"'); 
	}
	else
	{
		document.write('wmode="transparent"'); 
	}
    document.write('/></object>'); 
}

function clean_input(name,text,class_name)
{
	if(document.getElementById(name).value == text)
	{
		document.getElementById(name).value = "";
		document.getElementById(name).className = class_name;
	}
}

function check_input_text(name,text,class_name)
{
	if(document.getElementById(name).value == "")
	{
		document.getElementById(name).value = text;
		document.getElementById(name).className = class_name;
	}
}




