
// ================ DropDown MENU =================================
//IE	- document.body.clientWidth				NN	- window.innerWidth
//IE	- document.body.clientHeight				NN	- window.innerHeight
//	if (navigator.appName == 'Microsoft Internet Explorer'){
//	}
//	else if (navigator.appName == 'Netscape'){
//	}

function controlSubMenu(nam,vis){
	var width=0;
	if (navigator.appName == 'Microsoft Internet Explorer'){
		width = document.body.clientWidth;
	}
	else if (navigator.appName == 'Netscape'){
		width = window.innerWidth;
	}

	otstup= Math.abs((width - 907)/2);
	if ((width - 907) <= 0 ){otstup=0}

	if (document.getElementById){
		document.getElementById('submenuProfile').style.left	= otstup + 378;
		document.getElementById('submenuServices').style.left	= otstup + 325;
	}
	if (document.layers){
		document.layers['submenuProfileLayer'].left			= otstup + 425;
		document.layers['submenuServicesLayer'].left		= otstup + 372;
	}

	if (document.getElementById){
		document.getElementById(nam).style.visibility=vis;
	}

	if (document.layers){
		namlayer = nam + "Layer";
		document.layers[namlayer].visibility=vis;
	}
}

function validate(current_form){
	var forbibben = new Array('<','>','script','java');
	for (var counter=0; counter < current_form.length; counter++){
		for (var i=0; i<forbibben.length; i++){
        	if (current_form[counter].value.indexOf(forbibben[i])!=-1){
            	return false;
            }
        }
    }
    return true;
}
function CSURLPopupShow(formName, popupName, target) {
	var form  = (!IsIE()&&CSBVers>=5)?document.forms[formName]:CSFindElement(formName);
	var popup = form.elements[popupName];
	window.open(popup.options[popup.selectedIndex].value, target);
	popup.selectedIndex = 0;
}

function CreateWindow(url) {
	if (url=="#" || url==""){
    	return;
    }
    if (url.indexOf('http://')==-1 && url.indexOf('www')!=-1){
    	url = 'http://'+url;
    }
    if (url.indexOf('/')==-1 && url.indexOf('pdf')!=-1){
    	url = 'releases/'+url;
    }
    if (url.indexOf('/')==-1 && url.indexOf('doc')!=-1){
    	url = 'releases/'+url;
    }
    if (url.indexOf('/')==-1 && url.indexOf('xls')!=-1){
    	url = 'releases/'+url;
    }
	var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes,width=400,height=400,left=10,top=10,screenX=10,screenY=10';
	var tabWindow = window.open(url, '_blank');
//	tabWindow.location.href = url;
}