﻿//Load Images Used in news Scroller
if (document.images) {
    preload_NationalDay40 = new Image();
    preload_NationalDay40.src = "/images/News/NationalDay40_s.jpg";

    preload_civil = new Image();
    preload_civil.src = "/images/news/civil_s.jpg";


    preload_nissan = new Image();
    preload_nissan.src = "/images/news/nissan.jpg";

    preload_toyota = new Image();
    preload_toyota.src = "/images/news/toyota.jpg";

    preload_Bridgestone = new Image();
    preload_Bridgestone.src = "/images/news/bridgestone.gif";
    
    PreLoad_DMI=new Image();   
    PreLoad_DMI.src="/images/News/logo_DMI.gif";
   
    preload_Immgration = new Image();
    preload_Immgration.src = "/images/News/Immegration.jpg";
    preload_gitex = new Image();
    preload_gitex.src = "/images/News/Gitex2010_s.jpg";
    preload_blood = new Image();
    preload_blood.src = "/images/News/blood.jpg";
    
    
    }

    var ArabicNewsArr = new Array()
    ArabicNewsArr[0] = '<a href="../news.aspx#Civil"> عملية إخلاء وهمي في ورشة حكومة دبي   </a><br />19/01/2012 <br /><font color="#574F4E" size="2"> <img src="' + preload_civil.src + '" align="left" alt="اخلاء وهمي" style="padding:1px" > قامت مؤسسة ورشة حكومة دبي بتنفيذ عملية للإخلاء الوهمي اليوم الخميس بالتعاون مع الإدارة العامة للدفاع المدني بدبي ( مركز الكرامة ) وفريق الانقاذ بشرطة بدبي وشرطة دبي والإسعاف، حيث تم تنفيذ خطة إخلاء لحريق وهمي للورشة، وكان عدد الذين تم إخلاؤهم من الموظفين عدد (300) بحضور 20 من المراجعين ونتج عن ذلك إصابة واحدة.    </font> <Font ><a href="../news.aspx#Civil">المزيد</a></Font>'

    ArabicNewsArr[1] = '<a href="../news.aspx#NationalDay">  ماجد بن محمد يشهد حفل "ورشة حكومة دبي" باليوم الوطني   </a><br />01/12/2011 <br /><font color="#574F4E" size="2"> <img src="' + preload_NationalDay40.src + '" align="left" alt="العيد الوطني" style="padding:1px">  شهد سمو الشيخ ماجد بن محمد بن راشد آل مكتوم، رئيس هيئة الثقافة والفنون في دبي، صباح اليوم، حفل مؤسسة ورشة حكومة دبي، بمناسبة اليوم الوطني الأربعين، الذي عقد في مقر المؤسسة بمنطقة حوض دبي الجاف، بحضور حميد سلطان المطيوعي المدير التنفيذي للمؤسسة، واللواء محمد أحمد المري مدير عام الإدارة العامة للإقامة                                              </font> <Font ><a href="../news.aspx#NationalDay">المزيد</a></Font>'
    ArabicNewsArr[2] = '<a href="../news.aspx#Toyota">توقيع عقد توريد قطع غيار سيارات أصلية مع تويوتا   </a><br />05/07/2011 <br /><font color="#574F4E" size="2"> <img src="' + preload_toyota.src + '" align="left" alt="تويوتا" style="padding:1px"> تم توقيع عقد توريد قطع غيار سيارات أصلية مع شركة تويوتا لعام 2011 , كما تم تحديث البيانات على نظام ادارة المركبات الداخلي "فليت فووكس"  بما يتيح لقسم المشتريات اصدار أوامر الشراء بما يتفق مع الأسعار الحالية                                                  </font> <Font ><a href="../news.aspx#toyota">المزيد</a></Font>'
    ArabicNewsArr[3] = '<a href="../news.aspx#Nissan">توقيع عقد توريد قطع غيار سيارات أصلية مع نيسان   </a><br /> 03/07/2011 <br /><font color="#574F4E" size="2"> <img src="' + preload_nissan.src + '" align="left" alt="نيسان" style="padding:1px"> تم توقيع عقد توريد قطع غيار سيارات أصلية مع شركة نيسان لعام 2011 , كما تم تحديث البيانات على نظام ادارة المركبات الداخلي "فليت فووكس"  بما يتيح لقسم المشتريات اصدار أوامر الشراء بما يتفق مع الأسعار الحالية                                                  </font> <Font ><a href="../news.aspx#Nissan">المزيد</a></Font>'

    ArabicNewsArr[4] = '<a href="../news.aspx#Bridgestone">توقيع عقد توريد إطارات أصلية مع بريدجستون   </a><br />29/06/2011 <br /><font color="#574F4E" size="2"> <img src="' + preload_Bridgestone.src + '" align="left" alt="بريدجستون" style="padding:1px"> تم توقيع عقد توريد إطارات سيارات أصلية مع شركة بريدجستون لعام 2011 , كما تم تحديث البيانات على نظام ادارة المركبات الداخلي "فليت فووكس"  بما يتيح لقسم المشتريات اصدار أوامر الشراء بما يتفق مع الأسعار الحالية                                                  </font> <Font ><a href="../news.aspx#Bridgestone">المزيد</a></Font>'
    
    ArabicNewsArr[5] = '<a href="../news.aspx#DMI">توقيع إتفاق شراكة إستراتيجية مع مؤسسة دبي للإعلام  </a><br /> 19/06/2011 <br /><font color="#574F4E" size="2"> <img src="' + PreLoad_DMI.src + '" align="left" alt="مؤسسة دبي للإعلام" style="padding:1px"> وقعت مؤسسة دبي للإعلام إتفاقية شراكة إستراتيجية مع ورشة حكومة دبي يقوم بمقتضاها الأخير بصيانة وفحص وتجديد الملكية وبيع المركبات التي يرغب الطرف الثاني فى بيعها. كما ينص الاتفاق على إيجاد ربط إلكتروني بين قسم النقليات العامة التابع لمؤسسة دبي للإعلام                                                  </font> <Font ><a href="../news.aspx#DMI">المزيد</a></Font>'
     ArabicNewsArr[6] = '<a href="../news.aspx#blood">مشاركة ورشة حكومة دبى فى حملة التبرع بالدم  </a><br /> 05/04/2011 <br /><font color="#574F4E" size="2"> <img src="' + preload_blood.src + '" align="left" alt="حملة التبرع بالدم" style="padding:1px"> نظمت ورشة حكومة دبي في مقرها الثلاثاء الموافق 5 أبريل 2011 حملة للتبرع بالدم بالتعاون مع مركز التبرع بالدم التابع لدائرة الصحة والخدمات الطبية بدبي، وذلك في إطار استراتيجية الورشة ودورها الذي تؤكد عليه في خدمة المجتمع المحلي ودعم المنظمات والجمعيات الخيرية وكافة أشكال المساعدات الإنسانية                                                 </font> <Font ><a href="../news.aspx#blood">المزيد</a></Font>'
    ArabicNewsArr[7] = '<a href="../news.aspx#Gitex2010">مشاركة ورشة حكومة دبى بمعرض جيتكس 2010  </a><br /> 17/10/2010 <br /><font color="#574F4E" size="2"> <img src="' + preload_gitex.src + '" align="left" alt="معرض جيتكس 2010" style="padding:1px"> تشارك ورشة حكومة دبى بمعرض جيتكس 2010 حيث تعقد فعاليات المعرض فى الفترة ما بين 17-21 أكتوبر 2010 وتستعرض ورشة حكومة دبى العديد من الخدمات الالكترونية على الموقع الالكترونى للورشة وشرح الخدمات الفنية التى تقدمها لزوار المعرض                                                   </font> <Font ><a href="../news.aspx#gitex2010">المزيد</a></Font>'
 ArabicNewsArr[8]='<a href="../news.aspx#MBRF">مؤسسة محمد بن راشد للإسكان توقع عقد شراكة مع ورشة حكومة دبي </a><br /> 24/12/2009 <br /><font color="#574F4E" size="2">وقعت مؤسسة محمد بن راشد للإسكان عقد شراكة استراتيجية مع ورشة حكومة دبي بشأن إصلاح وصيانة المركبات العائدة للمؤسسة.ووقع الاتفاقية سعادة سامي قرقاش المدير التنفيذي لمؤسسة محمد بن راشد للإسكان، وسعادة حميد سلطان المطيوعي المدير التنفيذي لورشة حكومة دبي في مقر الورشة بحضور عدد من المسؤولين في الجانبين. </font> <Font ><a href="../news.aspx#MBRF">المزيد</a></Font>'
ArabicNewsArr[9]='<a href="../news.aspx#drnd">اتفاقية شراكة بين الجنسية وورشة حكومة دبي</a><br /> 05/10/2009 <br /><font color="#574F4E" size="2"><img src="' + preload_Immgration.src + '" align="left" alt="إدارة الجنسية والإقامة بدبي" style="padding:1px">وقعت إدارة الجنسية والإقامة بدبي وورشة حكومة دبي مذكرة تفاهم لتوثيق الشراكة بين الطرفين بشأن شراء وبيع وصيانة المركبات الخاصة بإدارة الجنسية والإقامة بدبي. وقام بتوقيعها مؤخرا سعادة اللواء محمد المري مدير إدارة الجنسية والإقامة بدبي ،وسعادة حميد سلطان المطيوعي المدير التنفيذي لورشة حكومة دبى </font> <Font ><a href="../news.aspx#drnd">المزيد</a></Font>'

var EnglishNewsArr = new Array()
EnglishNewsArr[0] = '<a href="../EN/news.aspx#Toyota">DGW renew supply agreement with Toyota Company</a><br /> 05/07/2011 <br /><font color="#574F4E" size="2"> <img src="' + preload_toyota.src + '" align="right" alt="Toyota" style="padding:1px"> DGW Renew supply agreement with Toyota Comapny for 2011, DGW updates all the data and new spares information with current prices in Vehicle management application "Fleet Focus" to allow the purchase section to issue LPOs with last price.    </font> <Font ><a href="/en/news.aspx#Toyota">More</a></Font>'

EnglishNewsArr[1] = '<a href="../EN/news.aspx#Nissan">DGW renew supply agreement with Nissan Company</a><br /> 03/07/2011 <br /><font color="#574F4E" size="2"> <img src="' + preload_nissan.src + '" align="right" alt="Nissan" style="padding:1px"> DGW Renew supply agreement with Nissan Comapny for 2011, DGW updates all the data and new spares information with current prices in Vehicle management application "Fleet Focus" to allow the purchase section to issue LPOs with last price.    </font> <Font ><a href="/en/news.aspx#Nissan">More</a></Font>'
EnglishNewsArr[2] = '<a href="../EN/news.aspx#Bridgestone">DGW renew supply agreement with Bridgestone Company</a><br /> 29/06/2011 <br /><font color="#574F4E" size="2"> <img src="' + preload_Bridgestone.src + '" align="right" alt="Bridgestone" style="padding:1px"> DGW Renew supply agreement with Bridgestone Comapny for 2011, DGW updates all the data and new spares information with current prices in Vehicle management application "Fleet Focus" to allow the purchase section to issue LPOs with last price.    </font> <Font ><a href="/en/news.aspx#Bridgestone">More</a></Font>' 

EnglishNewsArr[3] = '<a href="../EN/news.aspx#DMI">DMI sign a strategic partnership agreement with DGW </a><br /> 19/06/2011 <br /><font color="#574F4E" size="2"> <img src="' + PreLoad_DMI.src + '" align="right" alt="DMI" style="padding:1px"> DMI Signed a strategic partnership agreement with Dubai Government workshop to do all of the maintenance, inspection, License renewal and selling vehicles of DMI wishes to sell. The agreement provides an Electronic connection between the public transportation section of DMI and the Technical Affairs Department of DGW  ...    </font> <Font ><a href="/en/news.aspx#DMI">More</a></Font>' 

EnglishNewsArr[4] = '<a href="../EN/news.aspx#blood">DGW Participate in blood donation campaign </a><br /> 05/04/2011 <br /><font color="#574F4E" size="2"> <img src="' + preload_blood.src + '" align="right" alt="blood donation" style="padding:1px">  The blood donation is in keeping with the Dubai Government Workshop department""s commitment to supporting the needs of the community and its residents. The Department of Blood Transfusion and Research Services in Dubai organised a mobile blood donation station for ...    </font> <Font ><a href="/en/news.aspx#blood">More</a></Font>' 

EnglishNewsArr[5] = '<a href="../EN/news.aspx#Gitex2010">DGW Participate in Gitex 2010 </a><br /> 17/10/2010 <br /><font color="#574F4E" size="2"> <img src="' + preload_gitex.src + '" align="right" alt="Gitex 2010" style="padding:1px"> DGW Participate in Gitex exhibition in 17 - 21 October 2010, DGW show many E-Services on DGW website and explain all the provided technical services for our clients to Gitex visitors.                                               </font> <Font ><a href="/en/news.aspx#gitex2010">More</a></Font>' 
EnglishNewsArr[6]='<a href="/EN/news.aspx#MBRF">Mohammed bin Rashid Housing signed a partnership contract with Dubai Government Workshop</a><br /> 24/12/2009 <br /><font color="#574F4E" size="1"> Mohammed bin Rashid Housing Signed a strategic partnership with Dubai Government Workshop on the repair and maintenance of vehicles belonging to the institution. The agreement was signed by HE Sami Gargash, CEO of Mohammed bin Rashid Housing, HE Humaid Sultan Al Mutaiwee Executive Director of the Dubai Government Workshop at the workshop attended by officials of the the two sides.</font> <Font ><a href="/EN/news.aspx#MBRF">More</a></Font>'
EnglishNewsArr[7]='<a href="/EN/news.aspx#drnd">A partnership agreement between Dubai immigration and Dubai Government Workshop</a><br /> 05/10/2009 <br /><font color="#574F4E" size="1"><img src="' + preload_Immgration.src + '" align="right" alt="Department of Naturalization and Residency" style="padding:1px"> the Department of Naturalization and Residency in Dubai and Dubai Government Workshop Signed memorandum of understanding for closer partnership between the parties on the purchase, sale and maintenance of vehicles for the Department of Naturalization and Residency in Dubai. The agreement was signed by His Excellency Major General Mohammad Al Marri, Director of Dubai Naturalization and Residency Department, HE Humaid Sultan Al Mutaiwee Executive Director of DGW </font> <Font ><a href="/EN/news.aspx#drnd">More</a></Font>'


function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}


