function showBigPic(sURL,iWidth,iHeight,sHref){
	var isWebImg = (sHref)? '<A Href="javascript:window.opener.navigate(\'http://www.'+sHref+'\');window.close()" Style="font-family:\'Times New Roman\', Times, serif"><IMG Src="Images/Samples/'+sURL+'" Width="'+iWidth+'" Height="'+iHeight+'" Border="0"><BR>Visit website</A>' : '<IMG Src="Images/Samples/'+sURL+'" Width="'+iWidth+'" Height="'+iHeight+'" Border="0">';
	var winSizeOffset = (sHref)? 20 : 0;
	var oNewWindow = window.open("about:blank","BigPic","width="+iWidth.toString()+",height="+(iHeight+winSizeOffset).toString()+",channelmode=no,directories=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,titlebar=no,left=75,top=75");
	oNewWindow.document.write('<HTML><HEAD><TITLE>'+sURL+'</TITLE></HEAD><BODY Leftmargin="0" Topmargin="0" Marginwidth="0" Marginheight="0"><DIV Style="text-align:center"> '+isWebImg+' </DIV></BODY></HTML>');
	oNewWindow.document.close();
}

menuHeight = 310;
menuWidth = 120;
menuBorder = 1;

parentWidth = menuWidth+(menuBorder*2);
parentHeight = menuHeight+(menuBorder*2);
oDivParent = document.createElement("DIV");
oDivChild = document.createElement("DIV");
if(navigator.appName.indexOf("Netscape")>-1)
{
	with(oDivParent.style){
		position = "absolute";
		width = parentWidth;
		height = parentHeight;
		visibility = "hidden";
	}
	with(oDivChild.style){
		position = "absolute";
		width = menuWidth;
		height = menuHeight;
		clip = "rect(auto, auto,"+(menuHeight+12)+", auto)";
		backgroundColor = "#dddddd";
		borderWidth = menuBorder
		borderStyle = "solid";
		borderColor = "black";
		padding = 5;
	}
}
else
{
	with(oDivParent.style){
		position = "absolute";
		width = parentWidth;
		height = parentHeight;
		borderWidth = menuBorder
		borderStyle = "solid";
		borderColor = "black";
		visibility = "hidden";
	}
	with(oDivChild.style){
		position = "absolute";
		width = menuWidth;
		height = menuHeight;
		clip = "rect(auto, auto,"+menuHeight+", auto)";
		backgroundColor = "#dddddd";
		padding = 5;
	}
}

with(oDivChild){
	innerHTML  = '<div class="navMenu"><a href="aboutUs.aspx">About Us</a></div>';
	innerHTML += '<div class="navMenu"><a href="affiliates.aspx">Affiliates</a></div>';
	innerHTML += '<div class="navMenu"><a href="contactUs.aspx">Contact Us</a></div>';
	innerHTML += '<div class="navMenu"><a href="faq.aspx">FAQ</a></div>';
	innerHTML += '<div class="navMenu"><a href="howItWorks.aspx">How It Works</a></div>';
	innerHTML += '<div class="navMenu"><a href="index.aspx">Home Page</a></div>';
	innerHTML += '<div class="navMenu"><a href="ourValue.aspx">Our Value</a></div>';
	innerHTML += '<div class="navMenu"><a href="ourServices.aspx">Our Services</a></div>';
	innerHTML += '<div class="navMenu"><a href="pricesExplained.aspx">Prices Explained</a></div>';
	innerHTML += '<div class="navMenu"><a href="priceEstimates.aspx">Price Estimates</a></div>';
	innerHTML += '<div class="navMenu"><a href="pricingPlans.aspx">Pricing Plans</a></div>';
	innerHTML += '<div class="navMenu"><a href="rateSheet.aspx">Rate Sheet</a></div>';
	innerHTML += '<div class="navMenu"><a href="FoodFrontSampleWork.aspx">Sample Work</a></div>';
	innerHTML += '<div class="navMenu"><a href="signup.aspx">Sign Up</a></div>';
	innerHTML += '<div class="navMenu"><a href="termsOfUse.aspx">Terms Of Use</a></div>';
}

oDivParent.appendChild(oDivChild);

var aniEnd;
function startScrollUp(){
	placeMenu();
	if(navigator.appName.indexOf("Netscape")>-1){
		oDivParent.style.visibility = "hidden";
		clearInterval(aniEnd);
	}else{
		if(parseInt(oDivChild.currentStyle.clipBottom)-25 > 0){
			oDivChild.style.clip = "rect(auto, auto,"+(parseInt(oDivChild.currentStyle.clipBottom)-25)+", auto)";
			oDivParent.style.height = parseInt(oDivParent.style.height)-25;
		}
		else{
			oDivParent.style.visibility = "hidden"
			clearInterval(aniEnd)
			oDivChild.style.clip = "rect(auto)";
			oDivParent.style.height = parentHeight;
		}
	}
}

function placeMenu(){
	target = document.getElementById('popupLink')	
	browserWidth = (navigator.appName.indexOf("Netscape")>-1)? (window.innerWidth-35) : window.document.body.clientWidth;
	if(window.document.body.clientWidth>835){
		menuOffset = (target.offsetLeft+(browserWidth/2)+260);
		netscapeFix = 0;
	}else{
		menuOffset = (target.offsetLeft + target.parentNode.offsetLeft) - target.offsetWidth-10;
		netscapeFix = (navigator.appName.indexOf("Netscape")>-1)?10:0;
	}
	with(oDivParent.style){
		left = menuOffset-netscapeFix;
		top = target.offsetTop + target.offsetHeight + target.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.offsetTop;
	}
}

window.onload = function() {
	document.body.appendChild(oDivParent);
	document.getElementById('popupLink').onclick = function (evt) {
		target = (navigator.appName.indexOf("Netscape")>-1)? evt: event;
		placeMenu();
		oDivParent.style.visibility = "visible"
	};
	placeMenu();
	oDivParent.style.visibility = "visible"
	setTimeout("aniEnd=setInterval('startScrollUp()',10)",1500);
}

var target, targetTest, cancelTest;

function testMenu(){
	oDivParent.fireEvent("onmouseover")
}

function hideMenu(){
	oDivParent.style.visibility = "hidden";
	clearInterval(targetTest);
	clearTimeout(cancelTest);
}

oDivParent.onmouseout = function(evt) {
	clearInterval(targetTest);
	clearTimeout(cancelTest);
	target = (navigator.appName.indexOf("Netscape")>-1)? evt.target : event.srcElement;
	if(target.parentElement == oDivChild) {
		if(navigator.appName.indexOf("Netscape")>-1)
			evt.cancelBubble = true;
		else
			event.cancelBubble = true;
	}
	else {
		targetTest = setInterval("testMenu()",500);
		cancelTest = setTimeout("hideMenu()",1000);
	}
}

oDivParent.onmouseover = function(evt) {
	target = (navigator.appName.indexOf("Netscape")>-1)? evt.target : event.srcElement;
	if(target.parentElement == oDivChild || target.parentElement == oDivParent) {
		clearInterval(targetTest);
		clearTimeout(cancelTest);
	}
}