function gallery(){/*
window.onload=function(){
//initialize global vars
images = document.getElementById('imgholder').getElementsByTagName('img');
placeholder = document.getElementById('video');


for(var i=0;i<images.length;i++){
 
 images[i].style.cursor="pointer";  //asign hand icon to each image
 images[i].style.border="1px solid black";  //make black border
 //images[i].style.opacity=0.5;       //half opacity
 
 images[i].onclick=function(){      //load main img
  //store the clicked images source
  clickedSrc = this.src;
   //search & replace 'thumb' with 'large' - therby swapping
   //the directory from thumbs to large
   clickedSrc = clickedSrc.replace(/thumbs/,"large");
  placeholder.innerHTML = "<img src='"+ clickedSrc +"' width='' height='' />";
  //go to top of screen
  window.location  = "#";
 }
 
}//end for
}//end onload
*/}//end gallery

//insert swf
//example: insert("moviediv","600,"300,"/movies/my_movie.swf")
function insertswf(targetDiv,width,height,src){/*
 if(!document.getElementById(targetDiv) ){
  alert('The target ID: " '+targetDiv+'"  was not found in the Document Tree');
 }else{
 var alternateContent = '<p style="text-align:center;font-weight:bold;padding:20px;border:1px solid #B0232C;">Please Install Flash Player to View This Content - Most Sites Use Flash To Show Animations or Video, So Its good to install it ;) <br><br> <a href="http://get.adobe.com/flashplayer/" target="_blank" style="color:#990033;"><img src="http://wwwimages.adobe.com/www.adobe.com/shockwave/download/images/flashplayer_100x100.jpg" /><br><br>Click Here To Visit The Flash Player Website</a></p>';
 document.getElementById(targetDiv).innerHTML = '<!--[if !IE]> --> <object type="application/x-shockwave-flash"  data="'+src+'" width="'+width+'" height="'+height+'"> <!-- <![endif]--> <!--[if IE]> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"  width="'+width+'" height="'+height+'">  <param name="movie" value="'+src+'" /> <!--><!--dgx-->  <param name="loop" value="true" />  <param name="menu" value="false" />'+alternateContent+' </object> <!-- <![endif]-->';
 }
*/}

//open pop-up window
function openwindow(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
}
