var col1; 
    col1 = "#000000";
var col1off; 
    col1off = "#ffffff";

function taust1_1(asi1)
{asi1.bgColor = col1;}
function taust1_2(asi1)
{asi1.bgColor = col1off;}

var col2; 
    col2 = "#000000";
var col2off; 
    col2off = "#ffffff";

function taust2_1(asi1)
{asi1.bgColor = col2;}
function taust2_2(asi1)
{asi1.bgColor = col2off;}

function menyON(obj)
{obj.className='meny_tdON'}

function menyOUT(obj)
{obj.className='meny_td'}

function menyON_right(obj)
{obj.className='meny_tdON_right'}

function menyOUT_right(obj)
{obj.className='meny_td_right'}

/*
function meny_topON(obj)
{obj.className='menytop_tdON';
obj.previousSibling.className='menytop-left_tdON';
obj.nextSibling.className='menytop-right_tdON';
}

function meny_topOUT(obj)
{obj.className='menytop_td';
obj.previousSibling.className='menytop-left_td';
obj.nextSibling.className='menytop-right_td';
}
*/

function PopWindow(mypage,myname,w,h,scroll,pos)
{
var win=null;
		if(pos=='random')
			{LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
			TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
		if(pos=='center')
			{LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
		else if((pos!='center' && pos!='random') || pos=='null'){LeftPosition=5;TopPosition= 0;}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=0,directories=no,titlebar=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings)
;} 

/** DIV ON-OFF  **/
function onOff(obj) 
{
	var post =obj.getElementsByTagName('div')[0];  

		if (post.className =="Collapse")
		{post.className="Expand";
 
			return true;
		}
		if(post.className=='Expand')
		{post.className="Collapse";
 
			return true;
		}
}


/* lisatexti avamine */
function lisaText(obj)
{
var kaspikkToode = obj.parentNode.parentNode;
var lisatext = obj.nextSibling;

if (lisatext.className='lisaINVISIBLE' || kaspikkToode.style.height=='110px') 
	{lisatext.className='lisaVISIBLE'; kaspikkToode.style.height = 'auto'; return true;}
if (lisatext.className='lisaVISIBLE' || kaspikkToode.style.height=='auto') 
	{lisatext.className='lisaINVISIBLE'; kaspikkToode.style.height = '110px'; return true;}
}	

