function body_onmousemove(evt)
{
}
function body_onmouseout(evt)
{
}
function body_onmouseover(evt)
{
}
function body_onclick(evt)
{
	zoom_image_close();
}

function zoom_image_close()
{
	ie_body = document.getElementById('mbody');
	par = document.getElementById('iddivaimgs');

	if ( par.opened )
	{
		par.childNodes[0].style.display = "none";
		par.childNodes[1].style.display = "none";
		par.opened = false;
		par.asprt = false;
	}
	else
	{
		par.opened = true;
	}
}
function zoom_image_aspectratio(evt)
{
	ie_body = document.getElementById('mbody');
	par = document.getElementById('iddivaimgs');

	if ( par.opened && !par.asprt )
	{	
		fn_x = parseInt( ie_body.scrollLeft + ( ie_body.offsetWidth / 2 ) );

		if ( !document.all )
		{
			if (evt) fn_y = ( evt.pageY - evt.clientY + 15 );
			fn_h = ( window.innerHeight - 50 );
		}
		else
		{
			if (evt) fn_y = ( ie_body.scrollTop + 15 );
			fn_h = ( ie_body.clientHeight - 50 );
		}

		par.childNodes[1].style.height = fn_h+"px";

		fn_x = parseInt( fn_x - ( par.childNodes[1].offsetWidth / 2 ) );
		par.childNodes[1].style.left = fn_x+"px";
		if (evt) par.childNodes[1].style.top = fn_y+"px";

		par.childNodes[0].style.left = "0px";
		par.childNodes[0].style.top = "0px";
		par.childNodes[0].style.width = ie_body.scrollWidth+"px";
		par.childNodes[0].style.height = ie_body.scrollHeight+"px";

		//par.asprt = true;
	}

	setTimeout("zoom_image_aspectratio();", 1000);
}

function prepare_body_effect()
{
	ie_body = document.getElementById('mbody');

	ie_body.onmousemove = function(event){ body_onmousemove(event); };
	ie_body.onmouseout = function(event){ body_onmouseout(event); };
	ie_body.onmouseover = function(event){ body_onmouseover(event); };
	ie_body.onclick = function(event){ body_onclick(event); };

	//divaimgs = document.createElement("DIV");
	//divaimgs.setAttribute("id", "iddivaimgs");
	//ie_body.appendChild(divaimgs);

	//telone = document.createElement("DIV");
	//telone.style.position = "absolute";
	//telone.style.backgroundColor = "#000000";
	//telone.style.filter = "alpha(opacity=90);"
	//telone.style.opacity = 0.9;
	//telone.style.display = 'none';
	//divaimgs.appendChild(telone);

	//aimg = document.createElement("IMG");
	//aimg.style.position = "absolute";
	//aimg.style.backgroundColor = '#F0F0F0';
	//aimg.style.padding = "8px";
	//aimg.style.borderStyle = "solid";
	//aimg.style.borderWidth = "2px";
	//aimg.style.borderColor = "#606060";
	//aimg.style.display = 'none';
	//divaimgs.appendChild(aimg);
}

function zoom_image()
{
}

function zoom_image_set(evt, obj)
{
	ie_body = document.getElementById('mbody');

	st_x = DL_GetElementLeft(obj.childNodes[0]);
	st_y = DL_GetElementTop(obj.childNodes[0]);
	st_w = obj.childNodes[0].offsetWidth;
	st_h = obj.childNodes[0].offsetHeight;

	fn_x = parseInt( ie_body.scrollLeft + ( ie_body.offsetWidth / 2 ) );

	if ( !document.all )
	{
		fn_y = ( evt.pageY - evt.clientY + 15 );

		fn_w = ( window.innerWidth );
		fn_h = ( window.innerHeight - 50 );
	}
	else
	{
		fn_y = ( ie_body.scrollTop + 15 );

		fn_w = ( ie_body.scrollWidth );
		fn_h = ( ie_body.clientHeight - 50 );
	}

	telone = document.getElementById('iddivaimgs').childNodes[0];
	telone.style.left = "0px";
	telone.style.top = "0px";
	telone.style.width = ie_body.scrollWidth+"px";
	telone.style.height = ie_body.scrollHeight+"px";
	telone.style.display = "block";

	aimg = document.getElementById('iddivaimgs').childNodes[1];
	imgsrc = obj.href;
	fn_hb = fn_h;
	//fn_h = ( Math.max(100, Math.min(600, (Math.round(fn_h/100)*100))) );
	fn_h = ( Math.max(96, Math.min(800, fn_h)) );
	imgsrc = "./imgs/bg_loading_900x600.jpg";
	aimg.src = imgsrc;
	aimg.style.height = fn_hb+"px";
	aimg.style.top = fn_y+"px";

	aimg.style.display = 'block';

	imgsrc = get_url_resized_image(obj.href, 0, fn_h);
	aimg.src = imgsrc;
	aimg.style.height = fn_hb+"px";

	fn_x = parseInt( fn_x - ( aimg.offsetWidth / 2 ) );
	aimg.style.left = fn_x+"px";
	aimg.style.top = fn_y+"px";

	zoom_image_aspectratio(evt);
}

function prepare_effect_aimgzoom()
{
	array_of_effect_1 = ( ( document.all ) ? (new_getElementsByClassName(document,"aimgzoom")) : (document.getElementsByClassName("aimgzoom")) );
	effect_onclick = function(event){ zoom_image_set(event, this); return false; };

	if ( array_of_effect_1 ) for ( j=0 ; j<array_of_effect_1.length ; j++ )
	{
		array_of_effect_1[j].onclick = effect_onclick;
	}
}

function prepare_effect_imgcng1()
{
	array_of_effect_1 = ( ( document.all ) ? (new_getElementsByClassName(document,"imgcng1")) : (document.getElementsByClassName("imgcng1")) );
	effect_over = function(event){ this.src = this.src.replace(/_out_/g,'_over_'); };
	effect_out = function(event){ this.src = this.src.replace(/_over_/g,'_out_');};

	if ( array_of_effect_1 ) for ( j=0 ; j<array_of_effect_1.length ; j++ )
	{
		array_of_effect_1[j].onmouseover = effect_over;
		array_of_effect_1[j].onmouseout = effect_out;
		app_img = new Image;
		app_img.src = array_of_effect_1[j].src.replace(/_out_/g,'_over_');
	}
}

function prepare_effect_srcphtlidiv()
{
	array_of_effect_1 = ( ( document.all ) ? (new_getElementsByClassName(document,"csssrcpht2ullidiv")) : (document.getElementsByClassName("csssrcpht2ullidiv")) );
	effect_over = function(event){ this.childNodes[0].style.display = "block"; this.childNodes[1].style.display = "block"; };
	effect_out = function(event){ this.childNodes[0].style.display = "none"; this.childNodes[1].style.display = "none"; };

	if ( array_of_effect_1 ) for ( j=0 ; j<array_of_effect_1.length ; j++ )
	{
		array_of_effect_1[j].onmouseover = effect_over;
		array_of_effect_1[j].onmouseout = effect_out;
		array_of_effect_1[j].childNodes[0].style.display = "none";
		array_of_effect_1[j].childNodes[1].style.display = "none";
		if ( array_of_effect_1[j].childNodes[1].childNodes[1].childNodes[1] )
		{
			array_of_effect_1[j].childNodes[1].childNodes[1].childNodes[1].style.display = "none";
			array_of_effect_1[j].childNodes[1].childNodes[1].onmouseover = function(event){ this.childNodes[0].style.display = "none"; this.childNodes[1].style.display = "inline"; };
			array_of_effect_1[j].childNodes[1].childNodes[1].onmouseout = function(event){ this.childNodes[1].style.display = "none"; this.childNodes[0].style.display = "inline"; };
		}
	}
}
function prepare_effect_srcphtlidiv_stars(obj)
{
		if ( obj.childNodes[1].childNodes[1] )
		{
			obj.childNodes[1].childNodes[1].style.display = "none";
			obj.childNodes[1].onmouseover = function(event){ this.childNodes[0].style.display = "none"; this.childNodes[1].style.display = "inline"; };
			obj.childNodes[1].onmouseout = function(event){ this.childNodes[1].style.display = "none"; this.childNodes[0].style.display = "inline"; };
		}
}

function init_all_1()
{
	prepare_body_effect();
	prepare_effect_imgcng1();
	prepare_effect_aimgzoom();
	prepare_effect_srcphtlidiv();
	setTimeout("document.getElementById('flashobj').style.display = 'none';", 8100);
}

setTimeout("init_all_1()", 200);
