function ProcesProfile(){
    var result1="";
    
    var thisform = document.formProfile;
    //if (thisform.Country.selectedIndex !=0) {
		result1="country=Nederland";
    //    result1+=thisform.Country.options[thisform.Country.selectedIndex].text;
    //}

    var result2="";
    
    if (thisform.State.selectedIndex >0) {	
		result2="&Province=";
        result2+=thisform.State.options[thisform.State.selectedIndex].text;
    }
	
    var result3="";
    
    if (thisform.Theme.selectedIndex >0) {
    	if (result1!=""){ result3="&Theme="; } else { result3="Theme=";}
        result3+=thisform.Theme.options[thisform.Theme.selectedIndex].value;
    }	
   
    var result4="";
    
    if (thisform.Phase.selectedIndex >0) {
    	if (result1!="" || result3!="" ){ result4="&Phase="; } else { result4="Phase="; }
        result4+=thisform.Phase.options[thisform.Phase.selectedIndex].value;
    }
	   	
   	parent.document.getElementById("getResult").src = "calProfile.asp?"+result1+result2+result3+result4;

}

function ProcesSubsidy(){
    var result1="country=Nederland";
    
    var thisform = document.formSubsidy;
    //if (thisform.Country.selectedIndex !=0) {
    //    result1+=thisform.Country.options[thisform.Country.selectedIndex].text;
    //}

    var result2="";
    
    if (thisform.State.selectedIndex >0) {
    	result2="&Province=";
        result2+=thisform.State.options[thisform.State.selectedIndex].text;
    }
   	
   	parent.document.getElementById("getResult").src = "calSubsidy.asp?"+result1+result2;

}

function ProcesRole(){
    var result1="country=";
    
    var thisform = document.formRole;
    result1+=thisform.Country.options[thisform.Country.selectedIndex].text;

    var result2="";
    
    if (thisform.State.selectedIndex >0) {
    	result2="&Organ=";
        result2+=thisform.State.options[thisform.State.selectedIndex].text;
    }
   	
   	parent.document.getElementById("getResult").src = "calRole.asp?"+result1+result2;

}

function ProcesLinks(){
    var thisform = document.formLinks;
    
    var result1="";
    
    if (thisform.selectLinksCat.selectedIndex !=0) {
    	result1="&cat=";
        result1+=thisform.selectLinksCat.options[thisform.selectLinksCat.selectedIndex].value;
    }

    var result2="";
    
    if (thisform.selectLinksScale.selectedIndex !=0) {
    	result2="&scale=";
        result2+=thisform.selectLinksScale.options[thisform.selectLinksScale.selectedIndex].value;
    }

    var result3="";
    
    if (thisform.selectLinksLang.selectedIndex >0) {
    	result3="&lang=";
        result3+=thisform.selectLinksLang.options[thisform.selectLinksLang.selectedIndex].value;
    }   	
   	parent.document.getElementById("getResult").src = "calLinks.asp?op=1"+result1+result2+result3;
   	//arelt(parent.document.getElementById("getResult").src);

}

function openwindow(url,width,height)
{
	window.open(url,"","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=" + width + ", height=" + height)
}
function windowopen(fileurl, x, y){
	var popup1=window.open(fileurl,"upload", "toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=" + x + ",height=" + y) 
	popup1.moveTo((screen.width/2)-(x/2), (screen.height/2)-(y/2));
	popup1.focus();
}

function NewWindow(mypage,myname,w,h,scroll) {
    var win = null;
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
    win = window.open(mypage,myname,settings);
}

function FillCountry(cboCountry, cboState, sDefaultCountry){
	var sDefaultCountry, sDefault, sCountry
		
	cboCountry.options.length=0
	for(i=0;i<sCountryString.split("|").length;i++){
		sCountry = sCountryString.split("|")[i];

		if (sDefaultCountry == sCountry) {
			sDefault=true;
			if (navigator.appName=="Microsoft Internet Explorer"){cboState.focus();}
		}
		else {sDefault=false;}
		
		if (sDefault) {cboCountry.options[i]=new Option(sCountry,sCountry,sDefault,sDefault);}
		else {cboCountry.options[i]=new Option(sCountryString.split("|")[i]);}
	}
}
if (navigator.appName=="Netscape"){
isNav=true
}

function FillState(cboCountry, cboState, sDefaultState){
	var sDefaultState, sState, sDefault
		
	cboState.options.length=0
	for(i=0;i<sStateArray[cboCountry.selectedIndex].split("|").length;i++){
		sState = sStateArray[cboCountry.selectedIndex].split("|")[i];
		
		if(sDefaultState == sState) {
			sDefault=true;
			if (navigator.appName=="Microsoft Internet Explorer"){cboState.focus();}
		} 
		else {sDefault=false;}
		
		if(sDefault) {cboState.options[i]=new Option(sState,sState,sDefault,sDefault)}
		else {cboState.options[i]=new Option(sState,sState);}
	}
}