// JavaScript Document

var imgurl="http://www.0512seven.com/";

/* FLASHER */
var CreateSwf = function(url,id,options){
	var swfHtml='';
	if(!url){return;}
	_opt = options;
	if(isIE){
		swfHtml += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ _opt.width +'" height="'+ _opt.height +'" id="'+ id +'">';
		swfHtml += '<param name="movie" value="'+ url +'" />';
		swfHtml += '<param name="quality" value="high" />';
		swfHtml += '<param name="bgcolor" value="'+_opt.bgcolor+'" />';
		swfHtml += '<param name="wmode" value="'+ _opt.wmode +'" />';
		swfHtml += '<param name="FlashVars" value="'+_opt.FlashVars+'" />';	
		swfHtml += '</object>';
	}else{
		swfHtml += '<embed src="'+ url +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ _opt.width +'" height="'+ _opt.height +'" wmode="'+ _opt.wmode +'" FlashVars="'+_opt.FlashVars +'" bgcolor="'+_opt.bgcolor+'" id="'+ id +'" name="'+ id +'" swliveconnect="true"></embed>'
	}
	return swfHtml;
}
	
function flashWrite(url,id,w,h,bg,win){
	var flashHtml=CreateSwf(url,id,{
			width	: w,
			height	: h,
			wmode	: win,
			bgcolor	: bg
		});	
	document.write(flashHtml);}
	
function flashWriteVars(url,id,w,h,bg,win,vars){
	var flashHtml=CreateSwf(url,id,{
			width	: w,
			height	: h,
			wmode	: win,
			bgcolor	: bg,
			FlashVars: vars
		});	
	document.write(flashHtml);
	}	
	
function $img(id,w,h,img,a){
	if(img==''){img='/images/nophoto.gif';}else{img=imgurl+img;} //document.location=img;
    a=a.replace(new RegExp("&","gm"),"#");
	flashWriteVars("/images/img.swf",id,w,h,"","transparent","path="+img+"&a="+a);}	
	
function $imgo(id,w,h,img,a){
	if(img==''){img='images/nophoto.gif';}else{img=imgurl+img;} //document.location=img;
    a=a.replace(new RegExp("&","gm"),"#");
	flashWriteVars("swf/fimg.swf",id,w,h,"","transparent","imgSrc="+img+"&imgUrl="+a);}

function img(img,a){
	if(img==''){img='images/nophoto.gif';}else{img=imgurl+img}
	document.write('<a href="'+a+'"><img src="'+img+'"/></a>');
	}

function $simg(img,a){$img("",190,130,img,a);}

