﻿
var sectionGlobal = "";
    
        function toggleBox(szDivID, iState) // 1 visible, 0 hidden
        {
            if(document.layers)	   //NN4+
            {
               document.layers[szDivID].visibility = iState ? "show" : "hide";
               //fadeFunction(szDivID, iState);
            }
            else if(document.getElementById)	  //gecko(NN6) + IE 5+
            {
                var obj = document.getElementById(szDivID);
                obj.style.visibility = iState ? "visible" : "hidden";
                //fadeFunction(szDivID, iState);
            }
            else if(document.all)	// IE 4
            {
                document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
                //fadeFunction(szDivID, iState);
            }
        }
    
    
 
   
    
    function swapImage(imageOrdinal)
    {
        obj = document.getElementById('screenDetail');
        obj.src = 'images/screens/large/' + imageOrdinal + '.jpg';
    }
    
    
    

        
        function toggleDivBox(DivOrdinal,section) 
        {
            sectionGlobal = section;
        
            for(i=0; i<=2; i++)      
            {          
                toggleBox('div' + i, 0)    
            }
            
            for(i=1; i<=15; i++)      
            {          
                if(i < 10)
                {
                    document.getElementById('projectimg' + i).src = "../images/projects/" + section + "_S0" + i + ".jpg"
                }
                else
                {
                    document.getElementById('projectimg' + i).src = "../images/projects/" + section + "_S" + i + ".jpg"
                }
                
            }
            
             toggleBox('div' + DivOrdinal, 1) 
        }
        
        function changeLargeImage(imgOrdinal) 
        {
            toggleBox('detailImageDiv',1);
                
                if(imgOrdinal < 10)
                {
                    document.getElementById('detailimg').src = "../images/projects/" + sectionGlobal + "_L0" + imgOrdinal + ".jpg"
                }
                else
                {
                    document.getElementById('detailimg').src = "../images/projects/" + sectionGlobal + "_L" + imgOrdinal + ".jpg"
                }
            
        }
        
        function switchOffImage()
        {
            toggleBox('detailImageDiv',0);
            document.getElementById('detailimg').src = "";
        }


        var quotes=new Array()

        //change the quotes if desired. Add/ delete additional quotes as desired.

        quotes[0]='Our operations are both environmentally and economically sound, with our focus firmly on delivering a viable and reliable service.'
        quotes[1]='Drawing from our extensive knowledge base and experience, <b>SteelMac</b> Limited is in a position to determine the quality and type of metals and the best method to extract them.'
        quotes[2]='<b>SteelMac</b> Limited believes that the ecological benefits from ship dismantling are evident, as this removes older vessels that could pollute their surrounding area.'
        quotes[3]='At <b>SteelMac</b> we pride ourselves in safety for both personnel and the environment and as such we check for radiation and gas readings.'
        quotes[4]='It is <b>SteelMac\’s</b> policy, as a marine contractor, to provide an effective and efficient service based on skill, care and diligence.'
        quotes[5]='Being environmentally sensitive, <b>SteelMac</b> Limited employs the latest technology in the prevention of pollution.'
        quotes[6]='<b>SteelMac</b> Limited also undertakes the task of de-pollution, which directly aims at protecting the environment from sea pollution.'
        quotes[7]='Whether surveying liquid or dry cargo, investigating claims of shortage or assisting in the prevention of losses, <b>SteelMac</b> Limited aims to deliver the best service available. '
        quotes[8]='<b>SteelMac</b> services major import and export markets with all the main ferrous/non-ferrous metals working to ensure the quality and flow of material.'
        quotes[9]='At <b>SteelMac</b> all our products are made under international regulations and codes and our process is supervised by official organisations.';
        quotes[10]='At <b>SteelMac</b> we provide waste management solutions for a range of difficult wastes recognising the need to increase the recycling of waste materials.';
        quotes[11]='Our extensive fleet offers you a comprehensive choice with expert advisors who assist in finding the best solution for each task.';
        
        function makeQuote()
        {
            //quote generator
            var whichquote = Math.floor(Math.random()*(quotes.length))
            document.getElementById('QuoteDiv').innerHTML = '&quot;' + quotes[whichquote] + '&quot;';
        }
        
        
        
    function getParameter( parameterName ) 
	{
		var queryString = window.location.search.substring(1).toLowerCase();
		var parameters = new Array();
		parameters = queryString.split('&');
		for(var i = 0; i < parameters.length; i++) 
		{
			if (parameters[i].indexOf(parameterName.toLowerCase())>=0) 
			{
				var parameterValue = new Array();
				parameterValue = parameters[i].split('=');
				return parameterValue[1];
			}
		}
		
		return "null";
	}
	
	
	
	
	
	
	
	
	
	
	
	

