<!-- //



//Set tab to intially be selected when page loads:

//[which tab (1=first tab), ID of tab content to display]:

var initialtabhome=[1, "hm1"]



//Turn menu into single level image tabs (completely hides 2nd level)?

var hometurntosingle=0 //0 for no (default), 1 for yes



//Disable hyperlinks in 1st level tab images?

var homedisabletablinks=0 //0 for no (default), 1 for yes





//////////////// Stop editting ////////////////



var homeprevioustab=""



if (hometurntosingle==1)

	document.write('<style type="text/css">#hometabcontentcontainer{display: none;}</style>')



function expandcontenthm(cid, aobject){

	if (homedisabletablinks==1)

		aobject.onclick=new Function("return false")

	if (document.getElementById && hometurntosingle==0){

		homehighlighttab(aobject)

		if (homeprevioustab!="")

			document.getElementById(homeprevioustab).style.display="none"

			document.getElementById(cid).style.display="block"

			homeprevioustab=cid

	}

}



function homehighlighttab(aobject){

	if (typeof tabobjlinks=="undefined")

		collecthomimagetabs()

	for (i=0; i<tabobjlinks.length; i++)

		tabobjlinks[i].className=""

		aobject.className="current"

}



function collecthomimagetabs(){

	var tabobj=document.getElementById("homimagetabs")

	tabobjlinks=tabobj.getElementsByTagName("A")

}



function homedo_onload(){

	collecthomimagetabs()

	expandcontenthm(initialtabhome[1], tabobjlinks[initialtabhome[0]-1])

}



if (window.addEventListener)

	window.addEventListener("load", homedo_onload, false)

else if (window.attachEvent)

	window.attachEvent("onload", homedo_onload)

else if (document.getElementById)

	window.onload=homedo_onload



//--------------------------------------

// TICKER - START



//---------------

// Ticker startup



 function startTicker(){



	// Define run time values

	theCurrentStory     = -1;

	theCurrentLength    = 0;



	// Get the base objects

	theAnchorObject = document.getElementById("tickerAnchor");

	runTheTicker();

}



//---------------------

// Ticker main run loop



function runTheTicker(){



	var myTimeout;



	// Go for the next story data block

	if(theCurrentLength == 0){

		theCurrentStory++;

		theCurrentStory      = theCurrentStory % theItemCount;

		theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,'"');

		theTargetLink        = theSiteLinks[theCurrentStory];
        
		theAnchorObject.href = theTargetLink;

		// OLD

		//thePrefix 	     = "<span class=\"leftnav\">" + theLeadString + "</span>";

	}

	// Stuff the current ticker text into the anchor



	// OLD1

	//theAnchorObject.innerHTML = thePrefix +

	//theStorySummary.substring(0,theCurrentLength) + whatWidget();



	// NEW1

	theAnchorObject.innerHTML = theStorySummary.substring(0,theCurrentLength) + whatWidget();



	// Modify the length for the substring and define the timer

	if(theCurrentLength != theStorySummary.length){

		theCurrentLength++;

		myTimeout = theCharacterTimeout;

	}else{

		theCurrentLength = 0;

		myTimeout = theStoryTimeout;

	}



	// Call up the next cycle of the ticker

	setTimeout("runTheTicker()", myTimeout);

}



//-----------------

// Widget generator



function whatWidget(){



	if(theCurrentLength == theStorySummary.length){

		return theWidgetNone;

	}



	if((theCurrentLength % 2) == 1){

		return theWidgetOne;

	}else{

		return theWidgetTwo;

	}

}



//--------------------------------------

// Prefs, Headlines and Links



 var theCharacterTimeout = 50;

 var theStoryTimeout     = 2500; // 5000 is default

 var theWidgetOne        = "_";

 var theWidgetTwo        = "-";

 var theWidgetNone       = "";

// OLD

//var theLeadString       = "LATEST:&nbsp;";



var theSummaries = new Array();

var theSiteLinks = new Array();



var theItemCount = 5;



//-----------------------------

// Put Headlines and Links Here



theSummaries[0] = "Production of Sharif e-Learning Engineering Company |www.sharif-elearning.ir|";

theSiteLinks[0] = "index.htm";



theSummaries[1] = "The Complete Collection of References & Textbooks from B.S. to Ph.D.";

theSiteLinks[1] = "KADSoftware.htm";



theSummaries[2] = "Scientific Journal's Papers from 1998 to 2007 ";

theSiteLinks[2] = "KADSoftware.htm";



theSummaries[3] = "With Special Option Such as:";

theSiteLinks[3] = "KADSoftware.htm#Emkanat";



theSummaries[4] = "General & Professional Dictionary, Speech Engine, Search Engine, Flashcard, Highlight, Note, Print & ...";

theSiteLinks[4] = "KADSoftware.htm#Emkanat";



// TICKER - END

//--------------------------------------



// -->