//common JS file, included in the <head>

window.onload = function()
{
	if (document.URL.indexOf("http://investors.pizzainn.com") > -1)
	{
		
		var imageOne = document.getElementById('leftnav');
		//imageOne.id = "leftNavTwo";
		var dough = document.getElementById('doughImage');
		fixPNG(dough);
		
	//	fixPNG(imageOne);

	}
}


function initDropdowns(){ //v1.1.0.2 by PVII-www.projectseven.com
 if(navigator.appVersion.indexOf("MSIE")==-1){return;}
 var i,k,g,lg,r=/\s*p7hvr/,nn='',c,cs='p7hvr',bv='theTopNav';
 for(i=0;i<10;i++){g=document.getElementById(bv+nn);if(g){
 lg=g.getElementsByTagName("LI");if(lg){for(k=0;k<lg.length;k++){
 lg[k].onmouseover=function(){c=this.className;cl=(c)?c+' '+cs:cs;
 this.className=cl;};lg[k].onmouseout=function(){c=this.className;
 this.className=(c)?c.replace(r,''):'';};}}}nn=i+1;}
}


// Sweet PNG Hack on demand (http://homepage.ntlworld.com/bobosola/pnginfo.htm)
//  -- Just add this to img tag: onload="fixPNG(this)"   (Must have height/width defined)
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}




function  writeLocationBucket(){
	
	var x1 = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"  width="250" height="151">'
	var x2 = '<param name="movie" value="flash/bucketFindAStore.swf" />'
	var x3 = '<param name="quality" value="high" />'
	var x4 = '<embed src="flash/bucketFindAStore.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="250" height="151"></embed>'
	var x5 = '</object>'
	
	document.write(x1+x2+x3+x4+x5);	
}


//function writeLocationBucket()
//{
	//var so = new SWFObject("flash/bucketFindAStore.swf", "locationfinder", "250", "151", "8", "#B81319");
	//so.write("locationFlash");
//}

function openLegacyVideo(){
	window.open('/ownastore/legacyVideo.aspx','legacyWindow','status=1,toolbar=0,resizable=0,scrollbars=0,menubar=0,width=520,height=430,location=0');	
}
function moveHome()
{
	alert("testing");
}

