﻿/***********************************************
* Pausing updown message scroller- ? best hosting plan (www.hostine.net)
* Visit hostine network team http://www.hostine.net/ for best hosting plan
***********************************************/

//configure the below five variables to change the style of the scroller
var scrollerdelay='3000' //delay between msg scrolls. 3000=3 seconds.
var scrollerwidth='550px'
var scrollerheight='24px'
var scrollerbgcolor=''
//set below to '' if you don't wish to use a background image
var scrollerbackground=''

//configure the below variable to change the contents of the scroller
var messages=new Array()
messages[0]="رایانه دات کام - بزرگترین فروشگاه قطعات سخت افزاری ایران"
messages[1]="نظام صنفی رایانه ای خراسان رضوی"
messages[2]="نظام صنفی رایانه ای گیلان"
messages[3]="شرکت سپاد خراسان"
messages[4]="شرکت توزیع نیروی برق مشهد"
messages[5]="مجتمع تجاری الماس شرق"
messages[6]="دانشگاه پیام نور مشهد"
messages[7]="دانشگاه پیام نور بجنورد"
messages[8]="شهرداری مشهد"
messages[9]="سازمان فرهنگی تفریحی شهرداری مشهد"
messages[10]="سازمان جهاد کشاورزی خراسان رضوی"
messages[11]="سازمان آموزش و پرورش مازندران"
messages[12]="سازمان حمل و نقل پایانه های استان زنجان"
messages[13]="سازمان مناطق آزاد اروند"
messages[14]="اداره کار و امور اجتماعی خراسان شمالی"
messages[15]="اداره کل دامپزشکی خراسان جنوبی"
messages[16]="بنیاد مسکن انقلاب اسلامی خراسان رضوی"
messages[17]="بنیاد پژوهش های اسلامی"
messages[18]="جهاد دانشگاهی مشهد"
messages[19]="اتحادیه کامپیوتر مشهد"
messages[20]="اتحادیه تعاون روستایی استان خراسان رضوی"
messages[21]="مجتمع تولیدی چینی مقصود"
messages[22]="مجتمع نیروگاههای فراگامان"
messages[23]="موسسه آموزش عالی اشراق بجنورد"
messages[24]="موسسه آموزش عالی عطار"
messages[25]="دانشگاه آزاد اسلامی مشهد"
messages[26]="دانشگاه سیستان و بلوچستان"
messages[27]="بانک مسکن آذربایجان شرقی"
messages[28]="رایانه قدس رضوی"
messages[29]="پتروشیمی شهید عاشمی نژاد"
messages[30]="صنایع سنگ نطنز"
messages[31]="تبیان خراسان رضوی"
messages[32]="تبیان خراسان جنوبی"
messages[33]="تبیان قزوین"
messages[34]="نظام مهندسی ساختمان ایلام"

///////Do not edit past this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (messages.length>2)
i=2
else
i=0

function move(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move(tdiv)",scrollerdelay)
setTimeout("move2(second2_obj)",scrollerdelay)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move(tdiv)",50)
}
else{
tdiv.style.top=parseInt(scrollerheight)+"px"
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function move2(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move2(tdiv2)",scrollerdelay)
setTimeout("move(first2_obj)",scrollerdelay)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move2(second2_obj)",50)
}
else{
tdiv2.style.top=parseInt(scrollerheight)+"px"
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function startscroll(){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}

if (ie||dom){
// leftpx and toppx in line below is margin size for box
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+';background-image:url('+scrollerbackground+');left:5px;right:5px;top:2px;">')
// leftpx and toppx in line below are margins for text within box, defaults are 0 and 0
document.writeln('<div id="scroller" style="position:absolute;text-align:right;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:105px;right:5px;top:3px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}

if (window.addEventListener)
window.addEventListener("load", startscroll, false)
else if (window.attachEvent)
window.attachEvent("onload", startscroll)
else if (ie||dom)
window.onload=startscroll
