/*/////////////////////////////////////////////////////////////////////////////////////////////////*/

var timer_id;
function scroll_iframe(frm,inc,dir) {
  if (timer_id) clearTimeout(timer_id);
  if (window.frames[frm]) {
    if (dir == "v") window.frames[frm].scrollBy(0, inc);
    else window.frames[frm].scrollBy(inc, 0);
    timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20);
  }
}

function stopScroll() { if (timer_id) clearTimeout(timer_id); }

/*/////////////////////////////////////////////////////////////////////////////////////////////////*/
// START FLASH CODE
function addFlash(){
		document.write('<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="'+fWidth+'" HEIGHT="'+fHeight+'">');
		document.write('<param name="movie" value="../display.swf?totalRecord='+total+'&urlImg='+imgUrl+'">');
		document.write('<param name="quality" value="high">');
		document.write('<param name="scale" value="showall">');//noscale
		document.write('<param name="wmode" value="transparent">');
		document.write('<param name="bgcolor" value="#333333">');
		document.write('<embed src="../display.swf?totalRecord='+total+'&urlImg='+imgUrl+'" scale="showall "  bgcolor="#333333" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" WIDTH="'+fWidth+'" HEIGHT="'+fHeight+'">'); 
		document.write('</embed>');
		document.write('</object>');
}
/*/////////////////////////////////////////////////////////////////////////////////////////////////*/


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/* FORM VALIDATION: -------------------------------- */
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Username.value == "")
  {
    alert("Please enter a value for the \"Username\" field.");
    theForm.Username.focus();
    return (false);
  }

  if (theForm.Username.value.length < 6)
  {
    alert("Please enter at least 6 characters in the \"Username\" field.");
    theForm.Username.focus();
    return (false);
  }

  if (theForm.Username.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"Username\" field.");
    theForm.Username.focus();
    return (false);
  }

  if (theForm.UserEmail.value == "")
  {
    alert("Please enter a value for the \"UserEmail\" field.");
    theForm.UserEmail.focus();
    return (false);
  }

  if (theForm.UserEmail.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"UserEmail\" field.");
    theForm.UserEmail.focus();
    return (false);
  }

  if (theForm.UserEmail.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"UserEmail\" field.");
    theForm.UserEmail.focus();
    return (false);
  }
  return (true);
}

// Bloom Image Viewer : 1.0 DHTML NIRVANA * 4LevelWebs
// Original script by Eddie Traversa. All rights reserved.
 b=new Object();//1
 b.ir=false;//BTypvy
 b.zt="b";//LTy
function zoomIn(i,zs,mz){//Sp3#8C7788B0Ss4
	if(!document.layers&&document.getElementById){i=document.getElementById(i);}else 
	if(document.all){i=document.all(i);}if(!document.layers&&i){
	  if(!zs){if(b.zt=="v")zs=i.height/10;else zs=i.width/10;}
	  if(!mz){if(b.zt=="v")mz=i.height;else mz=i.width;}
	  if(i.state==null){i.state="off";i.index=0;i.ow=i.width;i.oh=i.height;i.zs=zs;i.mz=mz;}
	  if(i.state=="off"){i.state="zoomI"; s_Zoom();}else
	  if(i.state=="zoomIO"||i.state=="zoomO"){i.state="zoomI";}}
}
function zoomOut(i){
    if(!document.layers&&document.getElementById){i=document.getElementById(i);}else{
    if (document.all){i=document.all(i);}}
    if (!document.layers&&i){if(i.state=="on"){i.state="zoomO";s_Zoom();}else{
    if (i.state=="zoomI"){i.state="zoomIO";}}}
}
function s_Zoom(){
	if(!b.ir)Z_Anim();
}
 b.setZoom = function(i){
	if(b.zt=="h"){i.width=i.index;i.height=i.oh;}else
	if(b.zt=="v"){i.width=i.ow;i.height=i.index;}else{i.width=i.index;}
}
function Z_Anim(){
	b.ir=false;
	for(k=0;k<document.images.length;k++){var i=document.images[k];
		if(i.state){if(i.state=="zoomI"){if(i.index<i.mz)i.index+=i.zs;else i.index=i.mz;b.setZoom(i);
		if(i.index==i.mz)i.state="on";else b.ir=true;}else if(i.state=="zoomIO"){
		if(i.index<i.mz)i.index+=i.zs;else i.index=i.mz;b.setZoom(i);
		if(i.index==i.mz)i.state="zoomO";b.ir=true;}else
		if(i.state=="zoomO"){if(i.index>0)i.index-=i.zs;else i.index=0;b.setZoom(i);
		if(i.index==0)i.state="off";else b.ir=true;
		}}}
	if(b.ir)setTimeout("Z_Anim()",25);
}
function toggleVis(id,ty,tg) {
	var itg=(tg=='y')?'visible':'hidden';
	if(document.getElementById){eval("document.getElementById(id).style.visibility = \"" + itg + "\"");}else{
	if(document.layers){eval("document."+id+".visibility = \"" + ty + "\"");}else{
	if(document.all){eval("document.all." + id + ".style.visibility = \"" + itg + "\"");
	}}}
}

var timer = null;
var speed = 5;
function scrollSetup(id,parent) {
	if (document.getElementById&&!document.all){page=eval("document.getElementById(id).style");}else
	if (document.all){page=eval("document.all(id).style");}else 
	if (document.layers){page=eval("document.layers[parent].document.layers[id]");}
	scrl_bottom=165;
}
function scrollUp() {
	var y_pos=parseInt(page.top);
	if (y_pos<0)page.top=y_pos + speed;
	timer=setTimeout("scrollUp()",25);
}
function scrollDown() {
	var y_pos=parseInt(page.top);
	if (y_pos>-eval(scrl_bottom)){
	page.top=y_pos-speed}else{ 
	stopScroll()}timer=setTimeout("scrollDown()",25);
}
function stopScroll() {
    clearTimeout(timer);
}
//Bloom Menu End

