
/*********Edit values here for your pictures*******************/
var pic1='gallery/01.jpg',
pic2='gallery/02.png',
pic3='gallery/03.jpg',
pic4='gallery/04.jpg',
pic5='gallery/05.jpg',
pic6='gallery/06.jpg'
pic7='gallery/07.jpg',
pic8='gallery/08.jpg';
/***************End of Edit*********************************/

var rangPics=[pic1,pic2,pic3,pic4,];
var rangPics1=[pic5,pic6,pic7,pic8];
//var rangPics1=[pic8,pic9,pic10,pic11,pic12,pic13,pic14];  // Add all the picture variables in this array.

var c=0;	
var t;
var timer_is_on=0;

function timedCount()
{	//alert(Math.random());
	//alert(Math.random()*4);
	rangRandom = Math.round(Math.random()*(rangPics.length-1));
	rangRandom1 = Math.round(Math.random()*(rangPics1.length-1));
	//alert('rd-'+rangRandom+'rd1-'.rangRandom1);
	
	document.getElementById('show').innerHTML='<img src="'+rangPics[rangRandom]+'" alt="SharePro Running at" style="width:74px;height:51px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="'+rangPics1[rangRandom1]+'" alt="SharePro Running at" style="width:74px;height:51px;">';
	
	c=c+1;
	t=setTimeout("timedCount()",5000);
}

var testi1 = 'images/hm_testi_01.jpg',
testi2 = 'images/hm_testi_02.jpg',
testi3 = 'images/hm_testi_03.jpg';

var randTesti = [testi1,testi2,testi3];
var cnt = 0;
var tm;
var tm_on = 0;

function timedTesti() {
	testiRand = Math.floor(Math.random()*randTesti.length);
	document.getElementById('testi_div').innerHTML = '<img src="'+ randTesti[testiRand] +'" alt ="testimonial" style="width:234px;height:90px;">';
	
	cnt = cnt + 1;
	tm = setTimeout("timedTesti()",4000);
}

function timeMsg()
{
	if (!timer_is_on)
	  {
		  timer_is_on=1;
		  timedCount();
		  timedTesti();
	  }
}


function clear_field() {
	document.getElementById('query').value = '';
}

/*-----------------------------------*/

var mastertabvar=new Object()
mastertabvar.baseopacity=0
mastertabvar.browserdetect=""

function showsubmenu(masterid, id){
if (typeof highlighting!="undefined")
clearInterval(highlighting)
submenuobject=document.getElementById(id)
mastertabvar.browserdetect=submenuobject.filters? "ie" : typeof submenuobject.style.MozOpacity=="string"? "mozilla" : ""
hidesubmenus(mastertabvar[masterid])
submenuobject.style.display="block"
instantset(mastertabvar.baseopacity)
highlighting=setInterval("gradualfade(submenuobject)",50)
}

function hidesubmenus(submenuarray){
for (var i=0; i<submenuarray.length; i++)
document.getElementById(submenuarray[i]).style.display="none"
}

function instantset(degree){
if (mastertabvar.browserdetect=="mozilla")
submenuobject.style.MozOpacity=degree/100
else if (mastertabvar.browserdetect=="ie")
submenuobject.filters.alpha.opacity=degree
}


function gradualfade(cur2){
if (mastertabvar.browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
else if (mastertabvar.browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (typeof highlighting!="undefined") //fading animation over
clearInterval(highlighting)
}

function initalizetab(tabid){
mastertabvar[tabid]=new Array()
var menuitems=document.getElementById(tabid).getElementsByTagName("li")
for (var i=0; i<menuitems.length; i++){
if (menuitems[i].getAttribute("rel")){
menuitems[i].setAttribute("rev", tabid) //associate this submenu with main tab
mastertabvar[tabid][mastertabvar[tabid].length]=menuitems[i].getAttribute("rel") //store ids of submenus of tab menu
if (menuitems[i].className=="selected")
showsubmenu(tabid, menuitems[i].getAttribute("rel"))
menuitems[i].getElementsByTagName("a")[0].onmouseover=function(){
showsubmenu(this.parentNode.getAttribute("rev"), this.parentNode.getAttribute("rel"))
}
}
}
}


