/** 
* Returns file name 
*/ 
function getFileName() { 
	var path = window.location.pathname; 
	var filename; 
	for (i=0; i < path.length; i++){ 
		if (path.substring(i,i+1)=="/"){ 
			lastIndexOfSeperator = i+1; 
		} 
	} 
	filename = path.substring(lastIndexOfSeperator,path.length); 
	return filename; 
} 

function getParameters() {
	var param = window.location.search;
	return param;
}

/** 
* Change to another language 
*/ 
function chgLang(fmLang, toLang){ 
	filename = getFileName(); 
	chgTo = filename;

	chgTo = filename.substring(0,filename.indexOf(fmLang)) + toLang + filename.substring(filename.indexOf(fmLang)+3,filename.length);

	window.location = chgTo + getParameters();
} 

/**
* Open new window
*/
function openwin(url){
    window.open (url,'','height=400,width=600,resizable=yes,scrollbars=yes');  
}
function openfullwin(url){
    window.open (url,'','height=420,width=504,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no');  
}
function openDisclaimer(lang){
    window.open ('disclaimer_' + lang + '.htm','','height=300,width=400,resizable=yes,scrollbars=yes');  
}
function openLegal(lang){
    window.open ('legal_' + lang + '.htm','','height=300,width=400,resizable=yes,scrollbars=yes');  
}

function openCopyright(lang){
    window.open ('copyright_' + lang + '.htm','','height=300,width=400,resizable=yes,scrollbars=yes');  
}