ScrollGun = 0;
function init(){
 var pics = document.getElementById("pictures").childNodes;
 var length = pics.length;
 for(var i = 0 ; i < length ; i++) {
  if(pics[i].tagName == "TD")  {
   var td = document.createElement("TD");
   td.innerHTML = pics[i].innerHTML;
   document.getElementById("pictures").appendChild(td);
  }
 }
 document.getElementById("pictures").onmouseover = function (){
 ScrollGun= 1;
 }
 document.getElementById("pictures").onmouseout = function () {
  if(ScrollGun == 1) {
   ScrollGun = 0;
  }
 }
 ScrollPic();
}

function ScrollPic(){
 var layer = document.getElementById('MarqueePictues').getElementsByTagName("DIV")[0];
 if(ScrollGun==0){
	 if(layer.scrollLeft++ == layer.scrollLeft){
	  layer.scrollLeft = layer.clientWidth/2 - 40;
	 } 
 }
 setTimeout("ScrollPic()",50);
}
//--------------------------------------------------------------------------------------
ScrollGun2 = 0;
function init2(){
 var pics = document.getElementById("pictures2").childNodes;
 var length = pics.length;
 for(var i = 0 ; i < length ; i++) {
  if(pics[i].tagName == "TD")  {
   var td = document.createElement("TD");
   td.innerHTML = pics[i].innerHTML;
   document.getElementById("pictures2").appendChild(td);
  }
 }
 document.getElementById("pictures2").onmouseover = function (){
 ScrollGun2 = 1;
 }
 document.getElementById("pictures2").onmouseout = function () {
  if(ScrollGun2 == 1) {
   ScrollGun2 = 0;
  }
 }
 ScrollPic2();
}

function ScrollPic2(){
 var layer = document.getElementById('MarqueePictues2').getElementsByTagName("DIV")[0];
 if(ScrollGun2==0){
	 if(layer.scrollLeft++ == layer.scrollLeft){
	  layer.scrollLeft = layer.clientWidth/2 - 40;
	 } 
 }
 setTimeout("ScrollPic2()",50);
}
