function showImage()
{
    try
    {
        if (document.getElementById("Layer1").style.display == "none")
        {
            document.getElementById("Layer1").style.display = "block";
            document.getElementById("fade").style.display = "block";
        }
        else
        {
            document.getElementById("Layer1").style.display = "none";

        }
    }
    catch(e)
    {}
}
function IsScrollable(div,charLength)
{
    dname = div;
    if(document.getElementById(dname).innerHTML.length > charLength)
        return true;
    return false;
} 


function HideImage()
{
    document.getElementById('Layer1').style.display ='none';
    document.getElementById('fade').style.display ='none';
}
<!--
if (document.images) {
    var pum1 = new Image();
    pum1.src = "images/footer_bottom_rightimage.gif"
    var pum2 = new Image();
    pum2.src = "images/footer_bottom_right_roll.gif"
    var pum3 = new Image();
    pum3.src = "images/roll_overimage.gif"
}

function show_rock() 
{
    if (document.images) 
    {
        //script modified by Joe to avoid the image not getting displayed in inner pages
        var searchString = new String(window.location)
        //alert(searchString)
        var lastIndex = 0;
        for(il=0;il<searchString.length - 1;il++)
        {
            if(searchString.charAt(il) == "/")
            {
                lastIndex=il;
            }
        }
        searchString = searchString.substring(0, lastIndex) 
        //        var searchStringArray = searchString.split("/")
        //        searchString = "http://";
        //        for(il=1;il<searchStringArray.length - 1;il++)
        //        {
        //            if(searchStringArray[il] != "")
        //                searchString += searchStringArray[il] + "/"
        //        }
        //alert(searchString);
        //alert("host : http://" + window.location.host);
        //alert("Location : " + window.location)
        var pattern = new RegExp("\\b" + searchString + "\\b")
        var currentImagePath = pum2.src
        if(searchString == "")
        {
            document["pum"].src = currentImagePath;
        }
        else
        {
            var newImagePath = currentImagePath.replace(pattern,"http://" + window.location.host);               
            document["pum"].src = newImagePath;
        }
    }
}

function hide_rock() 
{
    if (document.images) 
    {
        //script modified by Joe to avoid the image not getting displayed in inner pages
        var searchString = new String(window.location)
        var lastIndex = 0;
        for(il=0;il<searchString.length - 1;il++)
        {
            if(searchString.charAt(il) == "/")
            {
                lastIndex=il;
            }
        }
        searchString = searchString.substring(0, lastIndex) 
        var pattern = new RegExp("\\b" + searchString + "\\b")            
        var currentImagePath = pum1.src
        if(searchString == "")
        {
            document["pum"].src = currentImagePath;
        }
        else
        {
            var newImagePath = currentImagePath.replace(pattern,"http://" + window.location.host);               
            document["pum"].src = newImagePath;
        }       
    }
}	
//-->
function show_rollimage()
{
    document.getElementById("hair").style.display = "block";
}
function hide_rollimage()
{
    document.getElementById("hair").style.display = "none";
}/*
function showPopup() 
{
   		
	document.getElementById('addnewiframelayer').style.display ='block'	
	document.getElementById('fade').style.display ='block'
	document.getElementById("selectbox1").className = "invisible"
	
   
}

function closePopup() 
{
   	
	parent.addnewiframelayer.style.display="none";
	parent.fade.style.display="none";
	parent.window.location.reload(); 
	parent.document.window.location.reload(); 
   
} */

function MM_openBrWindow(theURL,winName,features)
{ //v2.0
    window.open(theURL,winName,features);
}



/* function expand() {
	if (smallslot.width <=154) {
	//	x=window.setTimeout('expand()', 10)
		smallslot.width=smallslot.width + 10
		smallslot.height=smallslot.height + 10
	}
	
	}

function reduce() {
	if (smallslot.width <=156) {
		//x=window.setTimeout('reduce()', 10)
		smallslot.width=smallslot.width - 2
		smallslot.height=smallslot.height -  2
	}
} */

var sc1=0;
var sc2=0;
var tfnup;
var tfndown;
var tfnup1;
var tfndown1;
var dname;
function fnup_start(div)
{    
    dname=div;
    fnscroll(-1)
    //if(dname=='first')
    //			tfnup=setInterval("fnscroll(-1)",40);
    //			else
    tfnup1=setInterval("fnscroll(-1)",40);
}
function fnscroll(v)
{
//    alert("scroll height : " + document.getElementById(dname).scrollHeight)
//    alert("height : " + document.getElementById(dname).style.height)
    sc1=sc1+(5*v);
    if(sc1<0)
        sc1=0;
    else if(sc1>document.getElementById(dname).scrollHeight-(document.getElementById(dname).style.height))
        sc1=document.getElementById(dname).scrollHeight-(document.getElementById(dname).style.height);
    document.getElementById(dname).scrollTop=sc1;
} 

function fnup_end(div)
{
    //if(dname=='first')
    //			clearInterval(tfnup);
    //			else
    clearInterval(tfnup1);
			
}
function fndown_start(div)
{
				
    dname=div;
			
    fnscroll(1)
    //if(dname=='first')
    //			tfndown=setInterval("fnscroll(1)",40);
    //			else
    tfndown=setInterval("fnscroll(1)",40);
}
function fndown_end(div)
{
    //if(dname=='first')
    //			clearInterval(tfndown);
    //			else
    clearInterval(tfndown);
}
		
		
function expand1()
{
			
    smallslot1.width=smallslot1.width + 10
    smallslot1.height=smallslot1.height + 10	
}
	
function collapse1()
{
	
    smallslot1.width=smallslot1.width - 10
    smallslot1.height=smallslot1.height - 10
	
}
	
		
function expand2()
{
				
    smallslot2.width=smallslot2.width + 10
    smallslot2.height=smallslot2.height + 10	
}
	
function collapse2()
{
		
    smallslot2.width=smallslot2.width - 10
    smallslot2.height=smallslot2.height - 10
	
}
	
	
function expand3()
{
					
    smallslot3.width=smallslot3.width + 10
    smallslot3.height=smallslot3.height + 10	
}
	
function collapse3()
{
		
    smallslot3.width=smallslot3.width - 10
    smallslot3.height=smallslot3.height - 10
	
}
	
function expand4()
{
					
    smallslot4.width=smallslot4.width + 10
    smallslot4.height=smallslot4.height + 10	
}
	
function collapse4()
{
		
    smallslot4.width=smallslot4.width - 10
    smallslot4.height=smallslot4.height - 10
	
}
	
function expand5()
{
			
    smallslot5.width=smallslot5.width + 10
    smallslot5.height=smallslot5.height + 10	
}
	
function collapse5()
{
		
    smallslot5.width=smallslot5.width - 10
    smallslot5.height=smallslot5.height - 10
	
}
	
function expand()
{
    smallslot0.width=smallslot0.width + 10
    smallslot0.height=smallslot0.height + 10		
}
	
function collapse()
{
    smallslot0.width=smallslot0.width - 10
    smallslot0.height=smallslot0.height - 10			
}
	
	
function validateNumber(field, msg, min, max) { 
    if (!min) { min = 9 } 
    if (!max) { max = 9 } 

    if ( (parseInt(field.value) != field.value) ||  
        field.value.length < min || field.value.length > max) { 
        alert(msg); 
        document.getElementById("errormsg").className = "visible"


        field.focus(); 
        field.select(); 


        return false; 
    } 
    opener.location.href ="for_professionals.html";
    self.close();
    return true; 
}