﻿//+++++++++++++++++++++++++++++++ animted layer function +++++++++++++++++++++++++++++++
function animateHeight(id, size)
{
document.getElementById(id).style.visibility="visible";
var h_size1 = document.getElementById(id).offsetHeight;
if (h_size1 < size)
{
document.getElementById(id).style.height = h_size1 + 2+"px";
setTimeout("animateHeight('" + id + "','" + size + "')", 2);
}
}
//end animated layer function
//+++++++++++++++++++++++ Ajax Calling page with for checking forms +++++++++++++++++++++
function ajax_get_page(id,type,page,check)
{
document.getElementById(id).style.visibility='visible';
//document.getElementById(img_id).src = img_src;
//document.getElementById(img_id).alt="show";
//document.getElementById(id).className=class_name;
xmlhttp.open("GET",page+"?type="+type+"&"+type+"="+check);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById(id).innerHTML = xmlhttp.responseText;
}
}
xmlhttp.send(null);
}
//end ajax call page function
//+++++++++++++++++++++++ change class function ++++++++++++++++++++++++++++++++++++++++
function change_class(field,class_name)
{
field.className=class_name;
}
//end change class function
//+++++++++++++++++++++++ change photo function ++++++++++++++++++++++++++++++++++++++++
function photo_link(src,resolution)
{
	if(resolution == 'horzintal')
		window.parent.document.getElementById("container").src='<img src="'+src+'" name="photo" width="400" border="2" id="photo" style="filter:progid:DXImageTransform.Microsoft.Fade();cursor:url(../images/search.ico),pointer; />';
	else
		window.parent.document.getElementById("container").src='<img src="'+src+'" name="photo" height="420" border="2" id="photo" style="filter:progid:DXImageTransform.Microsoft.Fade();cursor:url(../images/search.ico),pointer; />';
alert(window.parent.document.getElementById("container").outterHTML);
}
//end change class function
//+++++++++++++++++++++++ show layer function ++++++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++ show layer function ++++++++++++++++++++++++++++++++++++++++
function show_layer(layer_id)
{
document.getElementById(layer_id).style.height='auto';
}
//+++++++++++++++++++++++ end show layer function ++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++++++++++ animted layer function +++++++++++++++++++++++++++++++
function hide_layer(layer_id)
{
document.getElementById(layer_id).style.height=0;
check_layer = false;
}
//end animated layer function
function swap_pic(id,src)
{
	document.getElementById(id).src=src;
}


function comment()
{
	document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';
}