//<!-- JavaScript Document

//change backgrounds of menu corners
function changecorners(id,dir)
{
var id1='cmenu'+id;
var class1;
var class2;
if (id=='left'){
	class1='hleftmenu';
	class2='pleftmenu';
	}
else {
	class1='hrightmenu';
	class2='prightmenu';
	}

if (dir==1){
	document.getElementById(id1).className=class1;
	}
else document.getElementById(id1).className=class2;
}


//submit form
function submitform(f1){
	document.getElementById(f1).submit();
	}


//Submit Form with condition
function submitform2(id1,id2,d)
{
var str=document.getElementById(id2).value;	
if (str!=d && str!=''){
	document.getElementById(id1).submit();
	}
}


function changeSearch(id,d,dir)
{
var str=document.getElementById(id).value;
if (dir==1){
	if (str==d) document.getElementById(id).value='';
	}
else {
	if (str=='') document.getElementById(id).value=d;
	}
}


//change link class for expanded submenu
var mlinks=new Object();
function changeclass(n,dir)
{
if (mlinks[n]==undefined) mlinks[n]=n;
for (var i in mlinks){
	if (i!=n) document.getElementById('mlink'+i).className='menulink';
	}

if (dir==1){
	document.getElementById('mlink'+n).className='activelink';
	}
else {
	document.getElementById('mlink'+n).className='menulink';
	}
}


//Open new window
function opennewwin(url,w,h)
{
var w=window.open(url, "newFile", 'width='+w+', height='+h+', scrollbars=yes, location=no, menubar=no, status=no, toolbar=no, resizable=no,top=2,left=2');
}

//-->
