function DisplayPage(picURL,picWidth,picHeight){
newWindow=window.open(picURL,'newWin','toolbar=no,scrollbars=1,width='+picWidth+',height='+picHeight)
newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth,picHeight-newWindow.document.body.clientHeight)
newWindow.focus()
}

function redir(sel){
document.location = sel.options[sel.options.selectedIndex].value;
}

function HideOrShowStuff(regionToHide)
{
    if (document.getElementById)
    {
    	
        // Hide all regions
        document.getElementById('region1').style.display = 'none';
        document.getElementById('region2').style.display = 'none';
        document.getElementById('region3').style.display = 'none';
        document.getElementById('region4').style.display = 'none';
        document.getElementById('link1').className = '';
        document.getElementById('link2').className = '';
        document.getElementById('link3').className = '';
        document.getElementById('link4').className = '';
        // Display the requested region
        document.getElementById
                ('region' + regionToHide).style.display = 'block';
        document.getElementById
                ('link' + regionToHide).className = 'current';
      //  if (regionToHide == 3 || regionToHide == 4 || regionToHide == 5) {
        //	document.getElementById('region1').style.display = 'block';
        //}
        //if (regionToHide == 6 || regionToHide == 7) {
        //	document.getElementById('region2').style.display = 'block';
       // }
    }
    else
    {
        alert('Sorry, your browser doesn\'t support this');
    }
}

function HideOrShowStuff2(regionToHide)
{
    if (document.getElementById)
    {
    	
        // Hide all regions
        document.getElementById('region1').style.display = 'none';
        document.getElementById('region2').style.display = 'none';
        document.getElementById('link1').className = '';
        document.getElementById('link2').className = '';
        // Display the requested region
        document.getElementById
                ('region' + regionToHide).style.display = 'block';
        document.getElementById
                ('link' + regionToHide).className = 'current';
    }
    else
    {
        alert('Sorry, your browser doesn\'t support this');
    }
}

// function parameters are: field - the string field, count - the field for remaining characters number and max - the maximum number of characters
function CountLeft(field, count, max) {
// if the length of the string in the input field is greater than the max value, trim it
if (field.value.length > max)
field.value = field.value.substring(0, max);
else
// calculate the remaining characters
//count.value = max - field.value.length;
count.value = field.value.length;
}

