<!--
function SearchBird()
{
	if (FormSearchBird.Bird.value!='')
		document.location.href = FormSearchBird.Bird.value ;
}


function sendMail() 
	{
		window.open("mailto:?subject=Engagement-Rings Web Site,?&amp;body=I would like to refer you to the following page:" + location.href );
	}


function showaddcomment()
{
	if (document.getElementById("addnew").style.display=="none")
	
		document.getElementById("addnew").style.display="block"
	
	else
		document.getElementById("addnew").style.display="none"
}

	
//GALLERY FUNCTIONS=====================================================

	function rate(gID)
	{
		
		window.open("gallery-image-rating.asp?GalleryID=" + gID,"WinRate","height=480,width=300,top=100,left=100,scrollbars=no,resizable=yes");
	}		


	function SortRes(page)
	{
		alert(Form1.SortBy.value)
		document.location.href=page+"?SB=" + Form1.SortBy.value +"&Cid="+Form1.CID.value;
	}


	function CheckFields()
	{
		if(FormGallery.PageID.value=='')
		{
			alert("Please Select Bird");
			FormGallery.PageID.focus();
		}
		else if(FormGallery.Picture1.value=='')
		{
			alert("Please upload image");
		}
		else
		{
			FormGallery.submit();
		}
	}
	
	
	

	
	function EmailAFriend(gID)
	{
		//alert();
		window.open("email-a-friend.asp?GalleryID=" + gID,"WinEmail","height=500,width=500,top=100,left=100,scrollbars=yes,resizable=yes,toolbars=yes");
	}
	
	
	function lo(url,AdvID,Position,Act,PageID,SesID)		//******** adv link outside
	{
		//**********  statistics *************
		var oXHR=CreateXHR();
		sURL="includes/AdvStats.asp?AdvID=" + AdvID + "&Position=" + Position + "&Act=" + Act + "&PageID=" + PageID + "&SesID=" + SesID
		//alert(sURL);
		oXHR.open("get",sURL ,false);
		oXHR.send(null);
		var sData=oXHR.responseText;
		//alert(sData);
		if(sData=='OK')
		{	
			//parent.document.getElementById("email").style.display="none";			
		}
		//*************************************		
		
		location.href=url;
	}
	
	
	function CreateXHR()
	{
		if(typeof XMLHttpRequest != "undefined")
		{
			return new XMLHttpRequest();
		}
		else if(window.ActiveXObject)
		{
			var aVersions=["MSXML2.XMLHttp.6.0", "MSXML2.XMLHttp.3.0"];
			
			for(var i=0; i<aVersions.length; i++)
			{
				try 
				{
					var oXHR=new ActiveXObject(aVersions[i]);
					return oXHR;
				}
				catch(oError)
				{
					//do nothing
				}
			}
		}
		throw new Error("XMLHttp object could not be created.");
	}
	
	function initPage(num,PageID,AffPageTrafficID)
	{
		if(num==1) // ************* default.asp
			{
			document.getElementById("dvAdvHP").innerHTML="<iframe src='AffiliateProducts.asp?PageID=" + PageID + "' align=left border=0 frameborder=0 framespacing=5 marginheight=5 marginwidth=5 width=95% height='550px' scrolling=no></iframe><br clear=all>" ;			
			}
		else if(num==2) // ************ design variation
			document.getElementById("dvAdv").innerHTML="<iframe src='AffiliateProductsVert.asp?PageID=" + PageID  + "' align=left border=0 frameborder=0 framespacing=5 marginheight=5 marginwidth=5 width=95% height='1400px;' scrolling=no></iframe><br clear=all>" ;		
		else if(num==3) // ************ bluebird house
		{
			document.getElementById("dvAdv").innerHTML="<iframe src='AffiliateProductsVert.asp?PageID=" + PageID  + "&aptid=" + AffPageTrafficID + "' align=left border=0 frameborder=0 framespacing=5 marginheight=5 marginwidth=5 width=95% height='1600px;' scrolling=no></iframe><br clear=all>" ;		
			document.getElementById("FeaturedProducts").innerHTML="<iframe src='AffiliateFeaturedProducts.asp?PageID=" + PageID  + "&aptid=" + AffPageTrafficID + "' align=left border=0 frameborder=0 framespacing=5 marginheight=0 marginwidth=0 width=99% height='377px;' scrolling=no></iframe><br clear=all>" ;		
		}
	}	
	

//-->
