function $(id) { return document.getElementById(id); }

function flashObject(file_id,file_name,width,height,FlashVars,wmode){
	document.write('<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="' + width + '" height="' + height + '" name="'+file_id+'" id="'+file_id+'">');
	document.write('<param name="movie" value="' + file_name + '">');
	document.write('<param name="quality" value="high">');
	if(wmode){
	document.write('<param name="wmode" value="transparent">');
	}
	document.write('<param name="FlashVars" value="'+FlashVars+'">');
	document.write('<param name="allowScriptAccess" value="always">');

	if(wmode){
		document.write('<embed id="'+file_id+'" name="'+file_id+'" src="' + file_name + '" width="' + width + '" height="' + height + '" quality="high" wmode="transparent" allowScriptAccess="always" FlashVars="'+FlashVars+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>');
		document.write('</object>');
	}else{
		document.write('<embed id="'+file_id+'" name="'+file_id+'" src="' + file_name + '" width="' + width + '" height="' + height + '" quality="high" FlashVars="'+FlashVars+'" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>');
		document.write('</object>');
	}


}
////

// http://www.alik.info/work/slb2.html
var SLB_cnt=0;function SLB(url,type)
{var a=document.getElementById('SLB_film');var b=document.getElementById('SLB_content');var c=document.getElementById('SLB_loading');if(url){a.style.top=0;a.style.left=0;a.style.display="";if(document.documentElement.scrollHeight>document.body.scrollHeight){a.style.height=document.documentElement.scrollHeight+'px';}else{a.style.height=document.body.scrollHeight+'px';}
c.style.display="block";SLB_setCenter(c,true);if(type=='image'){b.innerHTML="<img src="+url+" class='SLB_center' onload='SLB_setCenter(this);' />";if(arguments[2])a.onclick=function(){SLB()};if(arguments[3])b.innerHTML+="<div class='SLB_caption'>"+arguments[3]+"</div>";;}else if(type=='iframe'){b.innerHTML="<iframe id='SLB_iframe' src="+url+" width="+arguments[2]+" height="+arguments[3]+" class='SLB_center' marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' onload='tryReHeight("+arguments[5]+");'/></iframe>";if(arguments[4]){b.innerHTML+="<div class='SLB_close' onclick='SLB();' title='??'>close</div>";}
b.onclick='';b.firstChild.style.cursor='default';}else if(type='html'){b.innerHTML=url;SLB_setCenter(b.firstChild);if(arguments[2])b.onclick='';}
hideSelect();}else{a.onclick='';a.style.display="none";a.style.height='100%';a.style.width='100%';b.innerHTML="";b.onclick=function(){SLB()};c.style.display="none";showSelect();SLB_cnt=0;}}
function SLB_setCenter(obj){if(obj){var h=(window.innerHeight||self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);var w=(window.innerWidth||self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);var l=((window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft)+((w-(obj.width||parseInt(obj.style.width)||obj.offsetWidth))/2));var t=((window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)+((h-(obj.height||parseInt(obj.style.height)||obj.offsetHeight))/2));if((obj.width||parseInt(obj.style.width)||obj.offsetWidth)>=w)l=0;if((obj.height||parseInt(obj.style.height)||obj.offsetHeight)>=h)t=(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);if(!arguments[2]){if(obj.tagName!="IFRAME"&&obj.tagName!="IMG"){document.getElementById('SLB_content').style.left=l+"px";}else{document.getElementById('SLB_content').style.left=w/2+"px";}}
if(SLB_cnt==0){if(arguments[2]||(obj.tagName!="IFRAME"&&obj.tagName!="IMG")){document.getElementById('SLB_content').style.top=t+"px";}else{document.getElementById('SLB_content').style.top=h/2+"px";}
if(document.getElementById('SLB_content').offsetHeight>=h-20){SLB_cnt++;}
if(obj.nextSibling&&(obj.nextSibling.className=='SLB_close'||obj.nextSibling.className=='SLB_caption')){obj.nextSibling.style.display='block';if((t-(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop))>(obj.nextSibling.offsetHeight/2)){document.getElementById('SLB_content').style.top=parseInt(document.getElementById('SLB_content').style.top)-(obj.nextSibling.offsetHeight/2)+"px";}}}
if(!arguments[1]){document.getElementById('SLB_loading').style.display="none";}else{obj.style.left=l+"px";obj.style.top=t+"px";}
if(!arguments[2]&&(obj.tagName=="IFRAME"||obj.tagName=="IMG")){var finalx=(obj.width||parseInt(obj.style.width)||obj.offsetWidth);var finaly=(obj.height||parseInt(obj.style.height)||obj.offsetHeight);obj.width=0;obj.height=0}
obj.style.visibility='visible';if(!arguments[2]&&(obj.tagName=="IFRAME"||obj.tagName=="IMG")){elemResize(obj,[0,0],[finalx,finaly],1,1,1,1);elemMove(document.getElementById('SLB_content'),[w/2,h/2+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)],[l,t],1,1,1);}}}
function hideSelect(){var windows=window.frames.length;var selects=document.getElementsByTagName("SELECT");for(i=0;i<selects.length;i++)
{selects[i].style.visibility="hidden";}
if(windows>0){for(i=0;i<windows;i++){try{var selects=window.frames[i].document.getElementsByTagName("SELECT");for(j=0;j<selects.length;j++)
{selects[j].style.visibility="hidden";}}catch(e){}}}}
function showSelect(){var windows=window.frames.length;var selects=document.getElementsByTagName("SELECT");for(i=0;i<selects.length;i++)
{selects[i].style.visibility="visible";}
if(windows>0){for(i=0;i<windows;i++){try{var selects=window.frames[i].document.getElementsByTagName("SELECT");for(j=0;j<selects.length;j++)
{selects[j].style.visibility="visible";}}catch(e){}}}}
function tryReHeight(sign){var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1];var FFextraHeight=parseFloat(getFFVersion)>=0.1?16:0;var currentfr=document.getElementById('SLB_iframe');if(sign==true){try{if(currentfr.contentDocument&&currentfr.contentDocument.body.offsetHeight){setIframeSize(currentfr.contentDocument.body.offsetHeight+FFextraHeight);}else if(currentfr.Document&&currentfr.Document.body.scrollHeight){setIframeSize(currentfr.Document.body.scrollHeight);}}catch(e){}}else{SLB_setCenter(currentfr);}}
function setIframeSize(h,w){SLB_cnt=0;var ifr=currentfr=document.getElementById('SLB_iframe');if(ifr){if(w){ifr.width=w;}
if(h){ifr.height=h;}
SLB_setCenter(ifr);}}
function elemMove(elem,startPos,endPos,steps,intervals,powr){if(elem.posChangeMemInt)window.clearInterval(elem.posChangeMemInt);var actStep=0;elem.posChangeMemInt=window.setInterval(function(){elem.currentPos=[changeValue(startPos[0],endPos[0],steps,actStep,powr),changeValue(startPos[1],endPos[1],steps,actStep,powr)];elem.style.left=elem.currentPos[0]+"px";elem.style.top=elem.currentPos[1]+"px";actStep++;if(actStep>steps)window.clearInterval(elem.posChangeMemInt);},intervals);}
function elemResize(elem,startDim,endDim,steps,intervals,powr,mode){if(elem.dimChangeMemInt)window.clearInterval(elem.dimChangeMemInt);var actStep=0;elem.dimChangeMemInt=window.setInterval(function(){elem.currentDim=[changeValue(startDim[0],endDim[0],steps,actStep,powr),changeValue(startDim[1],endDim[1],steps,actStep,powr)];if(mode==1){elem.width=elem.currentDim[0];elem.height=elem.currentDim[1];}else{elem.style.width=elem.currentDim[0]+"px";elem.style.height=elem.currentDim[1]+"px";}
actStep++;if(actStep>steps)window.clearInterval(elem.dimChangeMemInt);},intervals);}
function changeValue(minValue,maxValue,totalSteps,actualStep,powr){totalSteps=Math.max(totalSteps,1)
var delta=maxValue-minValue;var stepp=minValue+(Math.pow(((1/totalSteps)*actualStep),powr)*delta);return Math.ceil(stepp)}
var prevOnScroll=window.onscroll;window.onscroll=function(){if(prevOnScroll!=undefined)prevOnScroll();if(document.documentElement.scrollHeight>document.body.scrollHeight){document.getElementById('SLB_film').style.height=document.documentElement.scrollHeight+'px';}else{document.getElementById('SLB_film').style.height=document.body.scrollHeight+'px';}
document.getElementById('SLB_film').style.width=document.body.scrollWidth+'px';SLB_setCenter(document.getElementById('SLB_content').firstChild,false,true);changeopacity('SLB_film',10);}
var prevOnResize=window.onresize;window.onresize=function(){if(prevOnResize!=undefined)prevOnResize();if(document.documentElement.scrollHeight>document.body.scrollHeight){document.getElementById('SLB_film').style.height=document.documentElement.scrollHeight+'px';}else{document.getElementById('SLB_film').style.height=document.body.scrollHeight+'px';}
document.getElementById('SLB_film').style.width=document.body.offsetWidth+'px';SLB_setCenter(document.getElementById('SLB_content').firstChild,false,true);}
//////

function changeopacity(obdiv_id, opacity) {
	var obdiv = document.getElementById(obdiv_id);
	obdiv.style.opacity = (opacity/100);
	obdiv.style.MozOpacity = (opacity /100);
	obdiv.style.KhtmlOpacity = (opacity/100);
	obdiv.style.filter = "alpha(opacity="+ opacity +")";
} 
//////


function mOpen(){ 
window.open('http://www.kromans.com/romans/member_memo.php','memo', 'width=700px, height=500px, left=100px, top=50px, scrollbars=yes, resizable=no, status=no, menubar=0'); }
