function showTab(x,allTabsCount){
	for(var i=1;i<(allTabsCount+1);i++)
	{	    
        var div = document.getElementById('Tab'+i);
        var link = document.getElementById('T'+i);
        try
        {
	        if(i==x)
	        {
                div.style.display='block';
                div.style.position='relative';
                div.style.visibility='visible';
                div.style.zIndex=100;
                link.className='on';
	        }
	        else
	        {
                div.style.display='none';
                div.style.visibility='hidden';
               link.className='off';
	        }
	    }
	    catch(e){;}
	}	
}



 function MM_findObj(n, d) {
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
var speed=40 
 
var loop, timer 
 
function ConstructObject(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
    this.up=MoveAreaUp;this.down=MoveAreaDown;

    this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth
    this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth
    this.left=MoveAreaLeft;this.right=MoveAreaRight;

	this.css.zIndex="3";
    this.MoveArea=MoveArea; this.x=0; this.y=0;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}
function MoveArea(x,y){ 

	this.x=x;this.y=y 
    this.css.left=this.x+'px'; 
    this.css.top=this.y+'px'; 
}

function MoveAreaDown(move){
   if(this.y>-this.scrollHeight+objContainer.clipHeight){
    this.MoveArea(this.x,this.y-move)
    if(loop) setTimeout(this.obj+".down("+move+")",speed)
   }
}
function MoveAreaUp(move){
   if(this.y<0){
    this.MoveArea(this.x,this.y-move)
    if(loop) setTimeout(this.obj+".up("+move+")",speed)
   }
}

function MoveAreaRight(move){
   if(-this.x + objContainer.clipWidth < this.scrollWidth){
    this.MoveArea(this.x-move,this.y)
    if(loop) setTimeout(this.obj+".right("+move+")",speed)
   }
   window.status = "right no action " + this.x;
}
function MoveAreaLeft(move){
   if(this.x<0){
    this.MoveArea(this.x-move,this.y)
    if(loop) setTimeout(this.obj+".left("+move+")",speed)
   }
   window.status = "left no action " + this.x;
}

function PerformScroll(direction,speed){
   if(initialised){
      loop=true;
	  if(direction == 0)
	  {
	        if(speed>0) objScroller.down(speed)
            else objScroller.up(speed)
	  }
	  else
	  {
	        if(speed>0) objScroller.right(speed)
            else objScroller.left(speed)
	  }
   }
} 


var initialised;
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') ;
    objScroller=new ConstructObject('divContent','divContainer'); 
    objScroller.MoveArea(0,0) ;
    objContainer.css.visibility='visible' ;
	
    initialised=true; 
}
function PerformScroll(direction,speed){
   if(initialised){
      loop=true;
	  if(direction == 0)
	  {
	        if(speed>0) objScroller.down(speed)
            else objScroller.up(speed)
	  }
	  else
	  {
	        if(speed>0) objScroller.right(speed)
            else objScroller.left(speed)
	  }
   }
}
function CeaseScroll(){ 
    loop=false; 
    if(timer) clearTimeout(timer) ;
} 

function InitialiseScrollableArea1(){ 
    objContainer=new ConstructObject('divContainer1') ;
    objScroller=new ConstructObject('divContent1','divContainer1'); 
    objScroller.MoveArea(0,0) ;
    objContainer.css.visibility='visible' ;
	
    initialised=true; 
}
function PerformScroll1(direction,speed){
   if(initialised){
      loop=true;
	  if(direction == 0)
	  {
	        if(speed>0) objScroller.down(speed)
            else objScroller.up(speed)
	  }
	  else
	  {
	        if(speed>0) objScroller.right(speed)
            else objScroller.left(speed)
	  }
   }
}
function CeaseScroll1(){ 
    loop=false; 
    if(timer) clearTimeout(timer) ;
} 


function showMapTab(x,allTabsCount){
	for(var i=1;i<(allTabsCount+1);i++)
	{	    
        var div = document.getElementById('TabM'+i);
        var link = document.getElementById('TM'+i);
        try
        {
	        if(i==x)
	        {
                div.style.display='block';
                div.style.position='relative';
                div.style.visibility='visible';
                div.style.zIndex=100;
                link.className='on';
	        }
	        else
	        {
                div.style.display='none';
                div.style.visibility='hidden';
               	link.className='off';
	        }
	    }
	    catch(e){;}
	}	
}

var gAutoPrint = true;

function printSpecial(id, imgPath)
{
    if (document.getElementById != null)
    {
        var html = '<html>\n<head>\n';
         
        if (document.getElementsByTagName != null)
        {
            var headTags = document.getElementsByTagName("head");
            if (headTags.length > 0)
            	html += headTags[0].innerHTML;
        }
		
		html +='\n<style>\n.world-map{ top:140px; left:340px; }\n';
		html +='<!--if <!--[if IE]>\n';
		
		html +='\n .awards-container ul li{ height:160px; }\n\n';
		html +='\n .rightsidebar{ margin-top:-385px; }\n\n';
		html +='\n .rightsidebar.margintopped{ margin-top:-383px;  position:absolute; left:-15px;}\n\n';
		html +='\n .shadowsep.small{ background: none;}\n\n';
		html +='\n .pagination.page-details{ background: none;}\n\n';
		html +='\n .back-to{ display:none;}\n\n';
		html +='\n .tabs{ display:none;}\n\n';
		html +='\n .pagination{ display:none;}\n\n';
		html +='\n a{ text-decoration:none; color:#000000;}\n\n';
		html +='<![endif]-->\n</style>';
        html += '\n</head>\n<body onLoad = "self.print();self.close();">\n';
		html +='\n <style> \n\n';
		html +='\n.sliding {  right: -36px;}\n';
		html +='\n.rightsidebar.margintopped {   margin-top: -122px;    position: absolute;}\n';
		html +='\n </style>\n\n';
        var printReadyElem = document.getElementById(id);//"descriptionText"

        if (printReadyElem != null)
        {
            html += '<div style=\"background-color:#690203;padding:10px 30px;width:740px;\"><img src=\"images/ksara-logo.png\"/></div><div style=\"width:700px; margin:20px;\"><p style="font-size:12px; color:#6D6E70; line-height:1.2em">'+printReadyElem.innerHTML+'</p></div>';
        }
        else
        {
            alert("Could not find the printReady function");
            return;
        }
     
        html += '\n</td></tr><tr><td></td></tr></table></body>\n</html>';
		
     	html += '<script type = \"text/javascript\">if(document.getElementById(\'sliding-arrow\') != null)document.getElementById(\'sliding-arrow\').innerHTML = \'\';';
		html += 'if(document.getElementById(\'divContainer1\') != null) document.getElementById(\'divContainer1\').setAttribute(\'id\',\'\');';
		html += 'if(document.getElementById(\'divContent1\') != null)document.getElementById(\'divContent1\').setAttribute(\'id\',\'\');';
		html += 'if(document.getElementById(\'divContainer\') != null) document.getElementById(\'divContainer\').setAttribute(\'id\',\'\');';
		html += 'if(document.getElementById(\'divContent\') != null)document.getElementById(\'divContent\').setAttribute(\'id\',\'\');';
		
		
		html += 'if(document.getElementById(\'Tab2\') != null){document.getElementById(\'Tab2\').style.display = \'block\';';
		html += 'document.getElementById("Tab2").style.visibility = "visible"; document.getElementById("Tab2").style.height = "auto";}';

		html += 'if(document.getElementById("Tab1") != null){document.getElementById("Tab1").style.display = "block";';
		html += 'document.getElementById("Tab1").style.visibility = "visible";';
		html += 'document.getElementById("Tab1").style.height = "auto";}';
		html += '</script>';

        var printWin = window.open("","printSpecial","width=740", "height=560");
        printWin.document.open();
        printWin.document.write(html);
        printWin.document.close();
        // if (gAutoPrint)
            // printWin.print();
		// printWin.close();
    }
    else
    {
        //alert("The print ready feature is only available if you are using an browser. Please update your browser.");
    }
}
