function FxPop(url,imgpath,post)
{
	if(post===undefined){post = false;}

	if(!imgpath){imgpath="a/imgframe/close_pop_image.jpg";}
	if(!url){url='http://www.google.com';}
	/* define css for the cover and popup */
	var _cnt_css = '.cbody{margin: 0px; padding:0px;color : #333;background-color: #FFF;font-family: Arial, Helvetica, sans-serif;font-size: 12px;}';
		_cnt_css+= '.bfreeze{overflow:hidden;} .dn {display:none;} ';
		_cnt_css+= '.det_cnt{position:fixed;top:50%;left:50%;width:0px;height:0px; overflow:visible;}';
		_cnt_css+= '.details{position:absolute;top:-237px;left:-362px;width:730px;height:480px;border:3px solid #999999; background-color:#FFFFFF;}';
		_cnt_css+= '.cover{position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:#000000;z-index:0; opacity:0.6;filter:alpha(opacity=60); '
		_cnt_css+= 'cursor:pointer;}';
		_cnt_css+= '.close{z-index:99;position:absolute; top:-234px; left:339px; width:32px; height:32px; background: url("'+ imgpath +'") no-repeat; cursor:pointer;}';

	/* insert css into html */

	var addCSS = document.createElement('style');
		addCSS.setAttribute('type','text/css');

	if (addCSS.styleSheet) {
		addCSS.styleSheet.cssText = _cnt_css
	} else {
		addCSS.appendChild(document.createTextNode(_cnt_css))
	}
	document.getElementsByTagName('head')[0].appendChild(addCSS);
	
	/* add div cover and details */
	var d1 = document.createElement('div');
	d1.setAttribute('id','cover');
	d1.setAttribute('class','cover');
	d1.onclick = function(){FxUnPop();}
	document.getElementsByTagName('body')[0].appendChild(d1);
	
	var d2 = document.createElement('div');
	d2.setAttribute('id','det_cnt');
	d2.setAttribute('class','det_cnt');
	document.getElementsByTagName('body')[0].appendChild(d2);

	var dc = document.createElement('div');
	dc.setAttribute('id','closeBTN');
	dc.setAttribute('class','close');
	dc.onclick = function(){FxUnPop();}
	document.getElementById('det_cnt').appendChild(dc);

	var d3 = document.createElement('div');
	d3.setAttribute('id','details');
	d3.setAttribute('class','details');
	document.getElementById('det_cnt').appendChild(d3);

	var d4 = document.createElement('iframe');
	d4.setAttribute('width','100%');
	d4.setAttribute('height','100%');
	d4.setAttribute('name','detframe');
	d4.setAttribute('frameborder','0');
	d4.setAttribute('scrolling','no');
	if(post===false){ // no posting
		d4.setAttribute('src',url);
		document.getElementById('details').appendChild(d4);
	} 
	if(post===true){  // posting
		document.getElementById('details').appendChild(d4);
		d4.setAttribute('src','');
		document.contact.target = 'detframe';
		document.contact.action = url;
		document.contact.submit();
	}
}
function FxUnPop()
{
	document.getElementById('det_cnt').parentNode.removeChild(document.getElementById('det_cnt'));
	document.getElementById('cover').parentNode.removeChild(document.getElementById('cover'));
}