var hh=0;
inter=setInterval('showBox()',5)
function selChange2(){
	d.sel1.pse.selectedIndex = d.sel2.pme.selectedIndex;
	selChange()
}
function selChange(){
	d.sel2.pme.selectedIndex = d.sel1.pse.selectedIndex;
	var mpath="";
	var checkVar = d.sel1.pse.options[d.sel1.pse.selectedIndex].innerHTML;
	if(checkVar.indexOf("Cubic")!=-1){
		mpath ="buy/cubicMenu/images/cubicMenu.png";
	}else if(checkVar.indexOf("Macromedia Style")!=-1){
		mpath ="buy/mmStyleMenu/images/mmmenu.png";
	}else if(checkVar.indexOf("Adobe Style")!=-1){
		mpath ="buy/adobeMenu/images/adobeMenu.png";
	}else if(checkVar.indexOf("Vista Navigation")!=-1){
		mpath ="flash-menus/Vista_navigation_bar/images/vistamenu.png";
	}else if(checkVar.indexOf("Vista Drop Down")!=-1){
		mpath ="flash-menu/vista-drop-down/images/menuEx.png";
	}else if(checkVar.indexOf("Mac Style")!=-1){
		mpath ="buy/macStyleMenu/images/macMenu.png";
	}else if(checkVar.indexOf("Ruby Red")!=-1){
		mpath ="flash-menu/ruby/images/rubymenu2.png";
	}else if(checkVar.indexOf("Business Style")!=-1){
		mpath ="flash-menu/business-style/images/busimenu.png";
	}else if(checkVar.indexOf("Metallic")!=-1){
		mpath ="buy/metallicMenu/images/metalMenu.png";
	}else if(checkVar.indexOf("Vista Sliding")!=-1){
		mpath ="flash-menu-sliding/vista/images/slidingmenus.png";
	}else if(checkVar.indexOf("Vista Vertical Flyout")!=-1){
		mpath ="flash-menu-vertical/vista/images/menuEx.png";
	}else if(checkVar.indexOf("Business Drop Down")!=-1){
		mpath ="flash-menu/business-drop-down/images/menuEx.png";
	}else if(checkVar.indexOf("EDGE")!=-1){
		mpath ="flash-dynamic-menu/edge/images/edgemenu.png";
	}else if(checkVar.indexOf("Flat Vertical")!=-1){
		mpath ="flash-menu-vertical/flat/images/menu_flat.png";
	}else if(checkVar.indexOf("Orange")!=-1){
		mpath ="flash-menu/orange-drop-down/images/menuEx.png";
	}else if(checkVar.indexOf("Multicolor")!=-1){
		mpath ="web-menu/multicolor/images/mcolorm.jpg";
	}else if(checkVar.indexOf("Live Style")!=-1){
		mpath ="horizontal-menu/live/images/livemenupic.png";
	}else if(checkVar.indexOf("Yahoo! Style Menu Bar")!=-1){
		mpath ="menu-bar/yahoo/images/yahoomenubar.png";
	}else if(checkVar.indexOf("iPhone")!=-1){
		mpath ="accordion-menu/iphone/images/iphone-menu-demo.png";
	}else if(checkVar.indexOf("Business Accordion Menu")!=-1){
		mpath ="accordion-menu/business/images/busaccdemo.png";
	}else if(checkVar.indexOf("Classic Accordion Menu")!=-1){
		mpath ="accordion-menu/classic/images/classaccdemo.png";
	}else if(checkVar.indexOf("Yahoo! Style Accordion Menu")!=-1){
		mpath ="accordion-menu/yahoo/images/yahooaccdemo.png";
	}

	if(d.sel1.pse.selectedIndex > 0){
		objbyId("showBlock2").style.display = "block";
		objbyId("showBlock2").innerHTML = "<img id='nimg' src='http://f-source.com/"+mpath+"' />";	
	}else{
		objbyId("showBlock2").style.display = "none";
		objbyId("showBlock2").innerHTML  = "";
		hh = 0;
		objbyId("showBlock2").style.height = hh + 'px';
	}
}
function objbyId(id){
    if (d.getElementById)
        var returnVar = d.getElementById(id);
    else if (d.all)
        var returnVar = d.all[id];
    else if (d.layers)
        var returnVar = d.layers[id];
	if(!returnVar) returnVar = new Object();
    return returnVar;
}
function showBox(){
	if(hh > getImgSize(objbyId("nimg").src)){
		if(hh-getImgSize(objbyId("nimg").src)>10){
			hh-=8
		}else{
			hh-=1;
		}
	}else if(hh < getImgSize(objbyId("nimg").src)){
		hh+=10;
		
	}
	if(objbyId("showBlock2").style)objbyId("showBlock2").style.height = hh + 'px';
}
function getImgSize(imgSrc){
	var newImg = new Image();
	newImg.src = imgSrc;
	var height = newImg.height;
	return height;
}
