var the_timeout;
var locatie;

function Chgpic(poza)
{
document.getElementById('changepic').src=poza;
}

function ChgpicDiv(locatie, poza)
{
calea = 'images/toload/'+locatie+'/'+poza;
//alert(calea);
document.getElementById('changepic').src=calea;
}

function poptastic(url)
{
	newwindow=window.open(url,'name');
	if (window.focus) {newwindow.focus()}
}

function moveDiv()
{
  var the_style = getStyleObject("myDiv");
  if (the_style)
  {
    var current_top = parseInt(the_style.top);
	the_style.display='block';
    var new_top = current_top + 10;
    if (document.layers) 
      the_style.top = new_top;
    else 
      the_style.top = new_top + "px";

	if (new_top < 82)
      the_timeout = setTimeout('moveDiv();',5);
   }
   
}


function getStyleObject(objectId) {

    if(document.getElementById && document.getElementById(objectId)) 
		return document.getElementById(objectId).style;
    else
		if (document.all && document.all(objectId))
			return document.all(objectId).style;
    else 
		if (document.layers && document.layers[objectId]) 
			return document.layers[objectId];
    else 
		return false;
}

function hidediv1(id) {
 if (document.getElementById)
  document.getElementById(id).style.display = 'none';
 else 
 {
	if (document.layers)
		  document.id.display = 'none';
	else
		document.all.id.style.display = 'none';
}
  document.getElementById;
  var the_style = getStyleObject("myDiv");
  if (the_style)
  {
	    if (document.layers) 
      the_style.top = '-425';
    else 
      the_style.top = '-425' + "px";

  }
}


function wSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  var latime=myWidth;
  var calcul=(latime-836)/2;
  if (calcul<0) {
  calcul=0-calcul;
  }
  
  //alert(calcul);
	//document.write('<DIV id=divContainer1 style="Z-INDEX: 1; TOP: 410px; LEFT: '+calcul+'px; CLIP: rect(0px 455px 180px 0px); POSITION: absolute;HEIGHT:185px;">');
return(calcul);
}


function SendVar(miavar)
{
	document.write(miavar);
}

function doWnd(jId){ 
//---------------------------
	//alert(jId);
	window.open('imgload.php?img='+jId,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=100,left=150,width=592,height=540');


}
function doVideo(jId){ 
//---------------------------
	//alert('doVideo');
	window.open('videoload/'+jId,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=100,left=150,width=425,height=345');


}
function doWnd3(jFile){ 
//---------------------------
	window.open('video/'+jFile+'.html','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=100,left=150,width=640,height=480');


}

function blocking(nr)
{
	//alert("yuhu");
	if (document.layers)
	{
		current = (document.layers[nr].display == 'none') ? 'block' : 'block';
		document.layers[nr].display = current;
	}
	else if (document.all)
	{
		current = (document.all[nr].style.display == 'none') ? 'block' : 'block';
		document.all[nr].style.display = current;
	}
	else if (document.getElementById)
	{
		vista = (document.getElementById(nr).style.display == 'none') ? 'block' : 'block';
		document.getElementById(nr).style.display = vista;
	}
}
function hideMe(nr)
{
	if (document.layers)
	{
		current = (document.layers[nr].display == 'block') ? 'none' : 'none';
		document.layers[nr].display = current;
	}
	else if (document.all)
	{
		current = (document.all[nr].style.display == 'block') ? 'none' : 'none';
		document.all[nr].style.display = current;
	}
	else if (document.getElementById)
	{
		vista = (document.getElementById(nr).style.display == 'block') ? 'none' : 'none';
		document.getElementById(nr).style.display = vista;
	}
}


function getImage(pImageURL, j_idTag, hv) {
	var img=new Image();
    img.src=pImageURL;
	/*if (hv == '0'){
		var	hv_settings='width="540" height="405"';
	}else{
		var hv_settings='width="405" height="540"';
	}*/
	hv_settings ='';
    document.getElementById(j_idTag).innerHTML='<img border="0" src="'+pImageURL+'" '+ hv_settings +' class="Dot3"></a><br>';
    //return false;
}