function get_random()
{
    var ranNum= Math.round(Math.random()*5);
    return ranNum;
}
function draw_random(){
	var number = get_random();
	var temphtmp ="";
	if (number == 0){
		temphtml ="<br><p style='padding-left:10px;' class='title'> <img src='images/heading/3dots.gif' /> Manage IT </p><br>";
		temphtml +="<center><a href='manageit/manageit.php'><img border='0' src='images/icons/manageit.gif' width='93' height='87' /></a></center>"
	 temphtml +="<p style='padding-left:10px;'>Management of  technology projects and business systems from end to end.</p>";		
		 temphtml +="<p  style='padding-left:10px;' class='title'><a  class='title' href='http://www.inspireit.com.au/manageit/manageit.php' ><Click here to read more></a><br><br></p>";		
	}
	else if (number == 1){
				temphtml ="<br><p style='padding-left:10px;' class='title'> <img src='images/heading/3dots.gif' /> Secure IT </p><br>";
		temphtml +="<center><a href='secureit/secureit.php'><img  border='0' src='images/icons/secureit.gif' width='93' height='87' /></a></center>"				
	 temphtml +="<p style='padding-left:10px;'>Solutions to secure your business information from both external and internal threats.</p>";				
		 temphtml +="<p  style='padding-left:10px;' class='title'><a  class='title' href='http://www.inspireit.com.au/secureit/secureit.php' ><Click here to read more></a><br><br></p>";		
		}
	else if (number == 2){
				temphtml ="<br><p style='padding-left:10px;' class='title'> <img  src='images/heading/3dots.gif' /> Connect IT </p><br>";
		temphtml +="<center><a href='connectit/connectit.php'><img border='0' src='images/icons/connectit.gif' width='93' height='87' /></a></center>"				
	 temphtml +="<p style='padding-left:10px;' >Connect offices and teleworkers with a scalable, secure, seamless and cost effective network solution.</p>";				
		 temphtml +="<p  style='padding-left:10px;' class='title'><a  class='title' href='http://www.inspireit.com.au/connectit/connectit.php' ><Click here to read more></a><br><br></p>";		
		}
	
	else if (number == 3){
				temphtml ="<br><p style='padding-left:10px;' class='title'> <img  src='images/heading/3dots.gif' /> Buy IT </p><br>";
		temphtml +="<center><a href='buyit/buyit.php' ><img border='0' src='images/icons/buyit.gif' width='93' height='87'/></a>"				
	 temphtml +="<p  style='padding-left:10px; text-align: left;'>Buy online and save with next day delivery.</p>";				
		 temphtml +="<p   style='padding-left:10px;' class='title'><a  class='title'  href='http://www.simplymedia.com.au' target='_blank' ><Click here to read more></a><br><br></p>";		
		}	
	else {
				temphtml ="<br><p style='padding-left:10px;' class='title'> <img src='images/heading/3dots.gif' /> Process IT </p><br>";
		temphtml +="<center><a href='processit/processit.php' ><img border='0' src='images/icons/processit.gif' width='93' height='87' /></a></center>"				
	 temphtml +="<p  style='padding-left:10px;'>Increase productivity, visibility and customer service with a process management solution.</p>";						
		 temphtml +="<p  style='padding-left:10px;' class='title'><a  class='title' href='http://www.inspireit.com.au/processit/processit.php' ><Click here to read more></a><br><br></p>";		
		}	

	return temphtml;
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}
function setmenu(obj,lyr,left,up)
{
	var newX = findPosX(obj) -left;
	var newY = findPosY(obj) + up;
	var x = new getObj(lyr);
	x.style.top = newY + 'px';
	x.style.left = newX + 'px';
	x.style.visibility='visible';
	
}
function show(lyr)
{
	var x = new getObj(lyr);
	x.style.visibility='visible';
	
}
function hide(lyr)
{
	var x = new getObj(lyr);
	x.style.visibility='hidden';
	
}
function getObj(name)
{
 if (document.getElementById)
 {
	   this.obj = document.getElementById(name);
	   this.style = document.getElementById(name).style;
 }
 else if (document.all)
 {
	   this.obj = document.all[name];
	   this.style = document.all[name].style;
 }
 else if (document.layers)
 {
	   if (document.layers[name])
	   {
	   	this.obj = document.layers[name];
	   	this.style = document.layers[name];
	   }
	   else
	   {
	    this.obj = document.layers.testP.layers[name];
	    this.style = document.layers.testP.layers[name];
	   }
 }
}
function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }
