window.displayFlash = function(flashfile, flashid, flashwidth, flashheight, flashvars, align) {
	if (align == 'notransparency') {
		wmode = 'opaque'
	} else {
		wmode = 'transparent';
	}
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=11,0,28,0" id="'+flashid+'" width="'+flashwidth+'" height="'+flashheight+'">\n');
	document.write('<param name="movie" value="'+flashfile+'" />');
	document.write('<param name="bgcolor" value="#FFFFFF" />');
	document.write('<param name="quality" value="best" />');
	document.write('<param name="devicefont" value="true" />');
	document.write('<param name="wmode" value="'+wmode+'" />');
	document.write('<param name="allowscriptaccess" value="samedomain" />');
	document.write('<param name="FlashVars" value="'+flashvars+'"/>');
	if (align == 'exactfit') {
		document.write('<param name="scale" value="exactFit" />');
	} else {
		document.write('<param name="scale" value="noscale" />');
	}
	document.write('<param name="salign" value="l" />');
	document.write('<embed src="'+flashfile+'" quality="best" salign="l" flashVars="'+flashvars+'" width="'+flashwidth+'" height="'+flashheight+'" name="'+flashid+'" align="'+align+'" wmode="'+wmode+'" allowScriptAccess="sameDomain" allowFullScreen="true" scale="noscale" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" /><noembed></noembed></embed>');
	document.write('</object>');
}

function getFlashVersion() {
	try {
		try {
			// avoid fp6 minor version lookup issues
			// see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
			var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
			try {
				axo.AllowScriptAccess = 'always';
			}
			catch(e) {
				return '6,0,0';
			}
		} catch(e) {}

		return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
		// other browsers
	} catch(e) {
		try {
			if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
				return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
			}
		} catch(e) {}
	}

	return '0,0,0';
}

function createFlashVar(flashfile, flashid, flashwidth, flashheight, flashvars, align) {
		thisvar = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" id="'+flashid+'" width="'+flashwidth+'" height="'+flashheight+'" align="'+align+'">\n';
		thisvar = thisvar + '<param name="movie" value="'+flashfile+'" />';
		thisvar = thisvar + '<param name="bgcolor" value="#FFFFFF" />';
		thisvar = thisvar + '<param name="quality" value="best" />';
		thisvar = thisvar + '<param name="devicefont" value="true" />';
		thisvar = thisvar + '<param name="wmode" value="transparent" />';
		thisvar = thisvar + '<param name="allowscriptaccess" value="samedomain" />';
		thisvar = thisvar + '<param name="FlashVars" value="'+flashvars+'"/>';
		thisvar = thisvar + '<param name="scale" value="noscale" />';
		thisvar = thisvar + '<param name="salign" value="l" />';
		thisvar = thisvar + '<embed src="'+flashfile+'" quality="best" salign="l" flashVars="'+flashvars+'" width="'+flashwidth+'" height="'+flashheight+'" name="'+flashid+'" align="'+align+'" wmode="transparent" allowScriptAccess="sameDomain" allowFullScreen="true" scale="noscale" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" /><noembed></noembed></embed>';
		thisvar = thisvar + '</object>';
		
		return thisvar;
}

function playVideo(videofile,videoid) {
	displayFlash('/net/external/index/VideoPlayer.swf',videoid,450,372,'&video='+videofile,'');
}

function displayFlashResizable(flashfile, flashid, flashwidth, flashheight, flashvars, align) {
	document.write('<div id="div'+flashid+'" style="position:relative; width:'+flashwidth+'px; height:'+flashheight+'px; z-index:1">\n');
	document.write('<table  height="100%" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>\n');
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" id="'+flashid+'" width="100%" height="100%"">\n');
	document.write('<param name="movie" value="'+flashfile+'" />\n');
	document.write('<param name="bgcolor" value="#FFFFFF" />\n');
	document.write('<param name="quality" value="best" />\n');
	document.write('<param name="devicefont" value="true" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name="allowscriptaccess" value="samedomain" />\n');
	document.write('<param name="FlashVars" value="'+flashvars+'&id='+flashid+'"/>\n');
	document.write('<param name="scale" value="noscale" />\n');
	document.write('<param name="salign" value="LT" />\n');
	document.write('<embed src="'+flashfile+'" quality="best" salign="LT" flashVars="'+flashvars+'&id='+flashid+'" width="100%" height="100%" name="'+flashid+'" wmode="transparent" allowScriptAccess="sameDomain" scale="noscale" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('<noembed></noembed></embed>\n');
	document.write('</object>\n');
	document.write('</td></tr></table>\n</div>');	
}

function resizeFlash(flashid, newwidth, newheight) {
	if(document.all && !document.getElementById) {
 		document.all['div'+flashid].style.pixelWidth = newwidth;
 		document.all['div'+flashid].style.pixelHeight = newheight;
	} else {
		document.getElementById('div'+flashid).style.width = newwidth;
		document.getElementById('div'+flashid).style.height = newheight;
	}
}

function playMovie(moviefile, movieid, moviewidth, movieheight) {
	document.write('<object id="'+movieid+'" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject" width="'+moviewidth+'" height="'+movieheight+'">');
	document.write('<param name="FileName" value="'+moviefile+'">');
	document.write('<param name="AutoStart" value="-1">');
	document.write('<param name="ShowStatusBar" value="-1">');
	document.write('<param name="ShowControls" value="1">');
	document.write('<param name="ShowDisplay" value="0">');
	document.write('<param name="AudioStream" value="-1">');
	document.write('<param name="AutoSize" value="1">');
	document.write('<param name="WindowlessVideo" value="1">');
	document.write('<src="'+moviefile+'">');
	document.write('<embed width="'+moviewidth+'" height="'+movieheight+'" filename="'+moviefile+'" autostart="1" showstatusbar="0" showcontrols="1" showdisplay="0">');
	document.write('</embed></object>');
}

function uploadFiles(uploadDirectory, successURL, imagefilterenabled) {
	var _info = navigator.userAgent;
	var _ns = false;
	var _ns6 = false;
	var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
	var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0) || (_info.indexOf("IRIX") > 0)));
	var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
	vusername = "PrT7JmiC4ao=";
	vpassword = "y6Ho613/9ig=";
	vhost = "NZTAs29oNYQKng5eSFPKdpIHDAwaRWW3";
	vkey = "sOwg//pmKGOfChzfIfYOMA==";
	document.write('<span style="font-family: arial; font-size:12px;">PLEASE NOTE:  The features of this uploader requires Java(tm) to be installed.  To install, go here: <a href="http://www.java.com" target="_blank">http://www.java.com</a></span><br>');
	if (_ie == true) {
		document.write('<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="100%" height="250" name="uploadApplet"  codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=5,0,0,7">');
		document.write('<param name="code" value="com.javaatwork.myftpuploader.MyFTPUploader.class">');
		document.write('<param name="archive" value="/net/ZUpload/MyFTPUploader131/myftpuploader-standard-signed-v131.jar, /net/ZUpload/MyFTPUploader131/labels.jar">');
		document.write('<param name="name" value="uploadApplet">');
		document.write('<param name="type" value="application/x-java-applet;version=1.5">');
		document.write('<param name="scriptable" value="false">');

		document.write('<param name="asciiFileExtensions" value="txt, html, htm, xml">');
		document.write('<param name="automaticLogin" value="true">');
		document.write('<param name="userName" value="'+vusername+'">');
		document.write('<param name="password" value="'+vpassword+'">');
		document.write('<param name="host" value="'+vhost+'">');
		document.write('<param name="key" value="'+vkey+'">');
		document.write('<param name="uploadDirectories" value="false">');
		document.write('<param name="uploadDirectory" value="/'+uploadDirectory+'">');
		document.write('<param name="successURL" value="'+successURL+'">');
		document.write('<param name="backgroundColor" value="#ffffff">');
		document.write('<param name="deleteOnCancel" value="true">');
		document.write('<param name="nameConflict" value="overwrite">');
		if (imagefilterenabled == true) {
			document.write('<param name="fileFilter" value="Image files (*.jpg, *.jpeg, *.gif): jpg, jpeg, gif">');
		}
		document.write('<param name="iconAdd" value="http://www.javaatwork.com/images/add.gif">');
		document.write('<param name="iconRemove" value="http://www.javaatwork.com/images/remove.gif">');
		document.write('<param name="iconUpload" value="http://www.javaatwork.com/images/upload.gif">');
		document.write('<param name="maxByteSize" value="1000">');
		document.write('<param name="maxFileSize" value="10000">');
		document.write('<param name="rejectFileFilter" value="exe, bat, com, lnk, pif, vbs, asp, aspx">');
		document.write('<param name="serverType" value="ftp">');
		document.write('<param name="showThumbNailsInApplet" value="true">');
		document.write('<param name="showThumbNailsInFileDialog" value="false">');
		document.write('<param name="transferType" value="automatic">');

		document.writeln('</object>');
	} else {
		document.write('<applet name="MyFTPUploader" code="com.javaatwork.myftpuploader.MyFTPUploader.class" archive="/net/ZUpload/MyFTPUploader131/myftpuploader-standard-signed-v131.jar, /net/ZUpload/MyFTPUploader131/labels.jar" width="100%"  height="250">');
		document.write('<param name="asciiFileExtensions" value="txt, html, htm, xml">');
		document.write('<param name="automaticLogin" value="true">');
		document.write('<param name="userName" value="'+vusername+'">');
		document.write('<param name="password" value="'+vpassword+'">');
		document.write('<param name="host" value="'+vhost+'">');
		document.write('<param name="key" value="'+vkey+'">');
		document.write('<param name="uploadDirectories" value="false">');
		document.write('<param name="uploadDirectory" value="/'+uploadDirectory+'">');
		document.write('<param name="successURL" value="'+successURL+'">');
		document.write('<param name="backgroundColor" value="#ffffff">');
		document.write('<param name="deleteOnCancel" value="true">');
		document.write('<param name="nameConflict" value="overwrite">');
		if (imagefilterenabled == true) {
			document.write('<param name="fileFilter" value="Image files (*.jpg, *.jpeg, *.gif): jpg, jpeg, gif">');
		}
		document.write('<param name="iconAdd" value="http://www.javaatwork.com/images/add.gif">');
		document.write('<param name="iconRemove" value="http://www.javaatwork.com/images/remove.gif">');
		document.write('<param name="iconUpload" value="http://www.javaatwork.com/images/upload.gif">');
		document.write('<param name="maxByteSize" value="1000">');
		document.write('<param name="maxFileSize" value="10000">');
//		document.write('<param name="maxImageSize" value="500">');
		document.write('<param name="rejectFileFilter" value="exe, bat, com, lnk, pif, vbs, asp, aspx">');
		document.write('<param name="serverType" value="ftp">');
		document.write('<param name="showThumbNailsInApplet" value="true">');
		document.write('<param name="showThumbNailsInFileDialog" value="false">');
		document.write('<param name="transferType" value="automatic">');
		document.write('</applet>');
	}
	document.write('<div style="font-family: arial; font-size: 11px"><a href="'+successURL+'">When your upload completes, please click here to continue...</a></div>');
}

function uploadFilesC(uploadDirectory, successURL, imagefilterenabled, vhost, vusername, vpassword, vkey) {
	document.write('test');
	document.write('<applet code="ZUpload" Archive="/net/zupload/ZUpload.jar" width="450" height="300" border="0">');
	document.write('<param name="host" value="'+vhost+'">');
	document.write('<param name="user" value="'+vusername+'">');
	document.write('<param name="pass" value="'+vpassword+'">');
	document.write('<param name="path" value="'+uploadDirectory+'">');
	document.write('<param name="postscript" value="'+successURL+'">');
	document.write('</applet>');
}

function uploadFilesB(uploadDirectory, successURL, imagefilterenabled, vhost, vusername, vpassword, vkey) {
/*	var _info = navigator.userAgent;
	var _ns = false;
	var _ns6 = false;
	var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
	var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0) || (_info.indexOf("IRIX") > 0)));
	var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
	
//	document.writeln(navigator.appName);	
	document.write('<span style="font-family: arial; font-size:10px;">PLEASE NOTE:  The features of this uploader requires Java(tm) to be installed.<br>To install, go here: <a href="http://www.java.com" target="_blank">http://www.java.com</a></span><br>');
*/
	if ($.browser.msie) {
		document.write('<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="500" height="250" name="uploadApplet"  codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=5,0,0,7">');
		document.write('<param name="code" value="com.javaatwork.myftpuploader.MyFTPUploader.class">');
		document.write('<param name="archive" value="/net/ZUpload/MyFTPUploader131/myftpuploader-standard-signed-v131.jar, /net/ZUpload/MyFTPUploader131/labels.jar">');
		document.write('<param name="name" value="uploadApplet">');
		document.write('<param name="type" value="application/x-java-applet;version=1.5">');
		document.write('<param name="scriptable" value="false">');

		document.write('<param name="asciiFileExtensions" value="txt, html, htm, xml">');
		document.write('<param name="automaticLogin" value="true">');
		document.write('<param name="userName" value="'+vusername+'">');
		document.write('<param name="password" value="'+vpassword+'">');
		document.write('<param name="host" value="'+vhost+'">');
		document.write('<param name="key" value="'+vkey+'">');
		document.write('<param name="uploadDirectories" value="false">');
		document.write('<param name="uploadDirectory" value="/'+uploadDirectory+'">');
		document.write('<param name="successURL" value="'+successURL+'">');
		document.write('<param name="backgroundColor" value="#ffffff">');
		document.write('<param name="deleteOnCancel" value="true">');
		document.write('<param name="nameConflict" value="overwrite">');
		if (imagefilterenabled == true) {
			document.write('<param name="fileFilter" value="Image files (*.jpg, *.jpeg, *.gif): jpg, jpeg, gif">');
		}
		document.write('<param name="iconAdd" value="http://www.javaatwork.com/images/add.gif">');
		document.write('<param name="iconRemove" value="http://www.javaatwork.com/images/remove.gif">');
		document.write('<param name="iconUpload" value="http://www.javaatwork.com/images/upload.gif">');
		document.write('<param name="maxByteSize" value="1000">');
		document.write('<param name="maxFileSize" value="10000">');
		document.write('<param name="rejectFileFilter" value="exe, bat, com, lnk, pif, vbs, asp, aspx">');
		document.write('<param name="serverType" value="ftp">');
		document.write('<param name="showThumbNailsInApplet" value="true">');
		document.write('<param name="showThumbNailsInFileDialog" value="false">');
		document.write('<param name="transferType" value="automatic">');

		document.writeln('</object>');
	} else {
		document.write('<applet name="MyFTPUploader" code="com.javaatwork.myftpuploader.MyFTPUploader.class" archive="/net/ZUpload/MyFTPUploader131/myftpuploader-standard-signed-v131.jar, /net/ZUpload/MyFTPUploader131/labels.jar" width="500"  height="250">');
		document.write('<param name="asciiFileExtensions" value="txt, html, htm, xml">');
		document.write('<param name="automaticLogin" value="true">');
		document.write('<param name="userName" value="'+vusername+'">');
		document.write('<param name="password" value="'+vpassword+'">');
		document.write('<param name="host" value="'+vhost+'">');
		document.write('<param name="key" value="'+vkey+'">');
		document.write('<param name="uploadDirectories" value="false">');
		document.write('<param name="uploadDirectory" value="/'+uploadDirectory+'">');
		document.write('<param name="successURL" value="'+successURL+'">');
		document.write('<param name="backgroundColor" value="#ffffff">');
		document.write('<param name="deleteOnCancel" value="true">');
		document.write('<param name="nameConflict" value="overwrite">');
		if (imagefilterenabled == true) {
			document.write('<param name="fileFilter" value="Image files (*.jpg, *.jpeg, *.gif): jpg, jpeg, gif">');
		}
		document.write('<param name="iconAdd" value="http://www.javaatwork.com/images/add.gif">');
		document.write('<param name="iconRemove" value="http://www.javaatwork.com/images/remove.gif">');
		document.write('<param name="iconUpload" value="http://www.javaatwork.com/images/upload.gif">');
		document.write('<param name="maxByteSize" value="1000">');
		document.write('<param name="maxFileSize" value="10000">');
//		document.write('<param name="maxImageSize" value="500">');
		document.write('<param name="rejectFileFilter" value="exe, bat, com, lnk, pif, vbs, asp, aspx">');
		document.write('<param name="serverType" value="ftp">');
		document.write('<param name="showThumbNailsInApplet" value="true">');
		document.write('<param name="showThumbNailsInFileDialog" value="false">');
		document.write('<param name="transferType" value="automatic">');
		document.write('</applet>');
	}
	document.write('<div><a href="'+successURL+'">When your upload completes, please click here to continue...</a></div>');
}

function openWindow(url,id,w,h) {
	window.open(url,id,'height='+h+',width='+w+',toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=no');
}

function openWindowModal(url,id,w,h) {
	if (window.showModalDialog) {
		window.showModalDialog(url,id,"dialogWidth:"+w+"px;dialogHeight:"+h+"px");
	} else {
		window.open(url,id,'height='+h+',width='+w+',toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
	}
}

function borderize(divid, w) {
	cur = document.getElementById(divid).innerHTML;
	tablewidth = w + 32;
	xwidth = w - 200;
	
	x = '<table cellpadding="0" cellspacing="0" width="'+tablewidth+'">';
	x = x + '<tr><td width="14" height="14"><img src="/net/external/borderize/top-l.png" width="14" height="14"></td><td background="/net/external/borderize/top.png"><img src="/net/images/spacer.gif" width="1" height="1"></td></td><td width="18" height="14"><img src="/net/external/borderize/top-r.png" width="18" height="14"></td></tr>';
	x = x + '<tr><td width="14" background="/net/external/borderize/l.png"><img src="/net/images/spacer.gif" width="1" height="1"></td>';
	x = x + '<td>'+cur+'</td>';
	x = x + '<td width="19" background="/net/external/borderize/r.png"><img src="/net/images/spacer.gif" width="1" height="1"></td></tr>';
	x = x + '<tr><td width="14" height="20"><img src="/net/external/borderize/bottom-l.png" width="14" height="20"></td><td background="/net/external/borderize/bottom.png"><img src="/net/images/spacer.gif" width="1" height="1"></td><td width="18" height="20"><img src="/net/external/borderize/bottom-r.png" width="18" height="20"></td></tr>';
	x = x + '</table>';
	
	
	
	document.getElementById(divid).innerHTML = x;
}

function playFlashMovie(url,id,w,h) {
	vars = 'movie='+url+'&bgcolor=0x051615&fgcolor=0x13ABEC&volume=&autoplay=on&autoload=on&autorewind=on&clickurl=&clicktarget=';
	displayFlash('/net/external/index/flashvideo/player.swf','thismovie',400,300,vars,'');
}


/*
function boxify(fDomID, fTitle, fStyleID, fWidth, fHeight, fBGColor) {
	boxify2(fDomID, fTitle, fStyleID, fWidth, fHeight, fBGColor);
	style = 2;
	if (tw == undefined) {
		w = '100%';
	} else {
		w = tw + 23;
	}
	
	if (bgcolor == undefined) {
		bg = '#FFFFFF';
	} else {
		bg = bgcolor;
	}
	
	if (document.getElementById(divid)) {
		curW = document.getElementById(divid).offsetWidth - 26;
		cur = document.getElementById(divid).innerHTML;
		curDiv = document.getElementById(divid);
		
		if (th == undefined) {
			h = ''; 
		} else {
			h = th;
		}
		
		if (style == 2) {
			if (tw == undefined) {
				tw = '';
			}
			x = getBoxifySource(divid,curW,th);
		}
		
		newDiv = document.createElement("div");
		newDiv.innerHTML = x;
		
		parentDiv = curDiv.parentNode;
		parentDiv.insertBefore(newDiv,curDiv);

		holderDiv = document.getElementById(divid+'holder');
		holderDiv.appendChild(curDiv);
		
		if (document.getElementById(divid+'title')) {
			document.getElementById(divid+'title').innerHTML = boxtitle;
		}
	}
	
}
*/


function getBoxifySource(divid,w,h) {
	x = '<table width="'+w+'" height="'+h+'" cellpadding="0" cellspacing="0" style="border-spacing: 0px 0px">';
	x += '		<tr>';
	x += '			<td width="13" height="34"><div style="width: 13px; height: 34px; overflow: hidden"><img src="/net/images/boxify3/tl.png" width="13" height="34" border="0"></div></td>';
	x += '			<td background="/net/images/boxify3/t.png" style="background-repeat: repeat-x">';
	x += '				<div style="margin-left: 6px; margin-top: 8px; height: 20px; overflow: hidden">';
	x += '					<div id="'+divid+'title" style="float: left;  font-family: Arial; font-size: 12px; color: #494949; font-weight: bold"></div>';
	x += '					<div style="float: right; font-size: 18px; color: #494949; overflow: hidden"></div>';
	x += '				</div>';
	x += '			</td>';
	x += '			<td width="13" height="34"><div style="width: 13px; height: 34px; overflow: hidden"><img src="/net/images/boxify3/tr.png" width="13" height="34" border="0"></div></td>';
	x += '		</tr>';
	x += '		<tr>';
	x += '			<td width="13" background="/net/images/boxify3/l.png"><img src="/net/images/spacer.gif" width="1" height="1"></td>';
	x += '			<td id="'+divid+'holder" style="padding-left: 5px; padding-top: 10px; padding-bottom: 10px; background-color: #FFFFFF; text-align: left"></td>';
	x += '			<td width="13" background="/net/images/boxify3/r.png"><img src="/net/images/spacer.gif" width="1" height="1"></td>';
	x += '		</tr>';
	x += '		<tr>';
	x += '			<td width="13" height="21"><img src="/net/images/boxify3/bl.png" width="13" height="21"></td>';
	x += '			<td background="/net/images/boxify3/b.png" style="background-repeat: repeat-x"><img src="/net/images/spacer.gif" width="1" height="1"></td>';
	x += '			<td width="13" height="21"><img src="/net/images/boxify3/br.png" width="13" height="21"></td>';
	x += '		</tr>';
	x += '</table>';
	
	return x;
}

function frameify(divid) {
	cur = document.getElementById(divid).innerHTML;
	x = '<table width="100%" height="100%" cellpadding="0" cellspacing="0">';
	x = x + '<tr>';
	x = x + '	<td width="10" height="9"><img src="/net/images/frameify/tl.png" width="10" height="9"></td>';
	x = x + '	<td width="23" height="9"><img src="/net/images/frameify/topL.png" width="23" height="9"></td>';
	x = x + '	<td height="9" background="/net/images/frameify/t.png"><img src="/net/images/spacer.gif" width="1" height="1"></td>';
	x = x + '	<td width="25" height="9"><img src="/net/images/frameify/topR.png" width="25" height="9"></td>';
	x = x + '	<td width="14" height="9"><img src="/net/images/frameify/tr.png" width="14" height="9"></td>';
	x = x + '</tr>';
	x = x + '<tr>';
	x = x + '	<td width="10">';
	x = x + '		<table width="100%" height="100%" cellpadding="0" cellspacing="0">';
	x = x + '			<tr>';
	x = x + '				<td width="10" height="23"><img src="/net/images/frameify/leftT.png" width="10" height="23"></td>';
	x = x + '			</tr>';
	x = x + '			<tr>';
	x = x + '				<td width="10" background="/net/images/frameify/L.png"><img src="/net/images/spacer.gif" width="1" height="1"></td>';
	x = x + '			</tr>';
	x = x + '			<tr>';
	x = x + '				<td width="10" height="23"><img src="/net/images/frameify/leftB.png" width="10" height="23"></td>';
	x = x + '			</tr>';
	x = x + '		</table>';
	x = x + '	</td>';
	x = x + '	<td colspan="3">'+cur+'</td>';
	x = x + '	<td width="14">';
	x = x + '		<table width="100%" height="100%" cellpadding="0" cellspacing="0">';
	x = x + '			<tr>';
	x = x + '				<td width="14" height="23"><img src="/net/images/frameify/rightT.png" width="14" height="23"></td>';
	x = x + '			</tr>';
	x = x + '			<tr>';
	x = x + '				<td width="14" background="/net/images/frameify/R.png"><img src="/net/images/spacer.gif" width="1" height="1"></td>';
	x = x + '			</tr>';
	x = x + '			<tr>';
	x = x + '				<td width="14" height="23"><img src="/net/images/frameify/rightB.png" width="14" height="23"></td>';
	x = x + '			</tr>';
	x = x + '		</table>';
	x = x + '	</td>';
	x = x + '</tr>';
	x = x + '<tr>';
	x = x + '	<td width="10" height="15"><img src="/net/images/frameify/bl.png" width="10" height="15"></td>';
	x = x + '	<td width="23" height="15"><img src="/net/images/frameify/botL.png" width="23" height="15"></td>';
	x = x + '	<td height="9" background="/net/images/frameify/b.png"><img src="/net/images/spacer.gif" width="1" height="1"></td>';
	x = x + '	<td width="25" height="15"><img src="/net/images/frameify/botR.png" width="25" height="15"></td>';
	x = x + '	<td width="14" height="15"><img src="/net/images/frameify/br.png" width="14" height="15"></td>';
	x = x + '</tr>';
	x = x + '</table>';

	document.getElementById(divid).innerHTML = x;

}


/* Start swfobject.js */

/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject = function () { var D = "undefined", r = "object", S = "Shockwave Flash", W = "ShockwaveFlash.ShockwaveFlash", q = "application/x-shockwave-flash", R = "SWFObjectExprInst", x = "onreadystatechange", O = window, j = document, t = navigator, T = false, U = [h], o = [], N = [], I = [], l, Q, E, B, J = false, a = false, n, G, m = true, M = function () { var aa = typeof j.getElementById != D && typeof j.getElementsByTagName != D && typeof j.createElement != D, ah = t.userAgent.toLowerCase(), Y = t.platform.toLowerCase(), ae = Y ? /win/.test(Y) : /win/.test(ah), ac = Y ? /mac/.test(Y) : /mac/.test(ah), af = /webkit/.test(ah) ? parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, X = ! +"\v1", ag = [0, 0, 0], ab = null; if (typeof t.plugins != D && typeof t.plugins[S] == r) { ab = t.plugins[S].description; if (ab && !(typeof t.mimeTypes != D && t.mimeTypes[q] && !t.mimeTypes[q].enabledPlugin)) { T = true; X = false; ab = ab.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); ag[0] = parseInt(ab.replace(/^(.*)\..*$/, "$1"), 10); ag[1] = parseInt(ab.replace(/^.*\.(.*)\s.*$/, "$1"), 10); ag[2] = /[a-zA-Z]/.test(ab) ? parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0 } } else { if (typeof O.ActiveXObject != D) { try { var ad = new ActiveXObject(W); if (ad) { ab = ad.GetVariable("$version"); if (ab) { X = true; ab = ab.split(" ")[1].split(","); ag = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } } catch (Z) { } } } return { w3: aa, pv: ag, wk: af, ie: X, win: ae, mac: ac} } (), k = function () { if (!M.w3) { return } if ((typeof j.readyState != D && j.readyState == "complete") || (typeof j.readyState == D && (j.getElementsByTagName("body")[0] || j.body))) { f() } if (!J) { if (typeof j.addEventListener != D) { j.addEventListener("DOMContentLoaded", f, false) } if (M.ie && M.win) { j.attachEvent(x, function () { if (j.readyState == "complete") { j.detachEvent(x, arguments.callee); f() } }); if (O == top) { (function () { if (J) { return } try { j.documentElement.doScroll("left") } catch (X) { setTimeout(arguments.callee, 0); return } f() })() } } if (M.wk) { (function () { if (J) { return } if (!/loaded|complete/.test(j.readyState)) { setTimeout(arguments.callee, 0); return } f() })() } s(f) } } (); function f() { if (J) { return } try { var Z = j.getElementsByTagName("body")[0].appendChild(C("span")); Z.parentNode.removeChild(Z) } catch (aa) { return } J = true; var X = U.length; for (var Y = 0; Y < X; Y++) { U[Y]() } } function K(X) { if (J) { X() } else { U[U.length] = X } } function s(Y) { if (typeof O.addEventListener != D) { O.addEventListener("load", Y, false) } else { if (typeof j.addEventListener != D) { j.addEventListener("load", Y, false) } else { if (typeof O.attachEvent != D) { i(O, "onload", Y) } else { if (typeof O.onload == "function") { var X = O.onload; O.onload = function () { X(); Y() } } else { O.onload = Y } } } } } function h() { if (T) { V() } else { H() } } function V() { var X = j.getElementsByTagName("body")[0]; var aa = C(r); aa.setAttribute("type", q); var Z = X.appendChild(aa); if (Z) { var Y = 0; (function () { if (typeof Z.GetVariable != D) { var ab = Z.GetVariable("$version"); if (ab) { ab = ab.split(" ")[1].split(","); M.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } else { if (Y < 10) { Y++; setTimeout(arguments.callee, 10); return } } X.removeChild(aa); Z = null; H() })() } else { H() } } function H() { var ag = o.length; if (ag > 0) { for (var af = 0; af < ag; af++) { var Y = o[af].id; var ab = o[af].callbackFn; var aa = { success: false, id: Y }; if (M.pv[0] > 0) { var ae = c(Y); if (ae) { if (F(o[af].swfVersion) && !(M.wk && M.wk < 312)) { w(Y, true); if (ab) { aa.success = true; aa.ref = z(Y); ab(aa) } } else { if (o[af].expressInstall && A()) { var ai = {}; ai.data = o[af].expressInstall; ai.width = ae.getAttribute("width") || "0"; ai.height = ae.getAttribute("height") || "0"; if (ae.getAttribute("class")) { ai.styleclass = ae.getAttribute("class") } if (ae.getAttribute("align")) { ai.align = ae.getAttribute("align") } var ah = {}; var X = ae.getElementsByTagName("param"); var ac = X.length; for (var ad = 0; ad < ac; ad++) { if (X[ad].getAttribute("name").toLowerCase() != "movie") { ah[X[ad].getAttribute("name")] = X[ad].getAttribute("value") } } P(ai, ah, Y, ab) } else { p(ae); if (ab) { ab(aa) } } } } } else { w(Y, true); if (ab) { var Z = z(Y); if (Z && typeof Z.SetVariable != D) { aa.success = true; aa.ref = Z } ab(aa) } } } } } function z(aa) { var X = null; var Y = c(aa); if (Y && Y.nodeName == "OBJECT") { if (typeof Y.SetVariable != D) { X = Y } else { var Z = Y.getElementsByTagName(r)[0]; if (Z) { X = Z } } } return X } function A() { return !a && F("6.0.65") && (M.win || M.mac) && !(M.wk && M.wk < 312) } function P(aa, ab, X, Z) { a = true; E = Z || null; B = { success: false, id: X }; var ae = c(X); if (ae) { if (ae.nodeName == "OBJECT") { l = g(ae); Q = null } else { l = ae; Q = X } aa.id = R; if (typeof aa.width == D || (!/%$/.test(aa.width) && parseInt(aa.width, 10) < 310)) { aa.width = "310" } if (typeof aa.height == D || (!/%$/.test(aa.height) && parseInt(aa.height, 10) < 137)) { aa.height = "137" } j.title = j.title.slice(0, 47) + " - Flash Player Installation"; var ad = M.ie && M.win ? "ActiveX" : "PlugIn", ac = "MMredirectURL=" + O.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + ad + "&MMdoctitle=" + j.title; if (typeof ab.flashvars != D) { ab.flashvars += "&" + ac } else { ab.flashvars = ac } if (M.ie && M.win && ae.readyState != 4) { var Y = C("div"); X += "SWFObjectNew"; Y.setAttribute("id", X); ae.parentNode.insertBefore(Y, ae); ae.style.display = "none"; (function () { if (ae.readyState == 4) { ae.parentNode.removeChild(ae) } else { setTimeout(arguments.callee, 10) } })() } u(aa, ab, X) } } function p(Y) { if (M.ie && M.win && Y.readyState != 4) { var X = C("div"); Y.parentNode.insertBefore(X, Y); X.parentNode.replaceChild(g(Y), X); Y.style.display = "none"; (function () { if (Y.readyState == 4) { Y.parentNode.removeChild(Y) } else { setTimeout(arguments.callee, 10) } })() } else { Y.parentNode.replaceChild(g(Y), Y) } } function g(ab) { var aa = C("div"); if (M.win && M.ie) { aa.innerHTML = ab.innerHTML } else { var Y = ab.getElementsByTagName(r)[0]; if (Y) { var ad = Y.childNodes; if (ad) { var X = ad.length; for (var Z = 0; Z < X; Z++) { if (!(ad[Z].nodeType == 1 && ad[Z].nodeName == "PARAM") && !(ad[Z].nodeType == 8)) { aa.appendChild(ad[Z].cloneNode(true)) } } } } } return aa } function u(ai, ag, Y) { var X, aa = c(Y); if (M.wk && M.wk < 312) { return X } if (aa) { if (typeof ai.id == D) { ai.id = Y } if (M.ie && M.win) { var ah = ""; for (var ae in ai) { if (ai[ae] != Object.prototype[ae]) { if (ae.toLowerCase() == "data") { ag.movie = ai[ae] } else { if (ae.toLowerCase() == "styleclass") { ah += ' class="' + ai[ae] + '"' } else { if (ae.toLowerCase() != "classid") { ah += " " + ae + '="' + ai[ae] + '"' } } } } } var af = ""; for (var ad in ag) { if (ag[ad] != Object.prototype[ad]) { af += '<param name="' + ad + '" value="' + ag[ad] + '" />' } } aa.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ah + ">" + af + "</object>"; N[N.length] = ai.id; X = c(ai.id) } else { var Z = C(r); Z.setAttribute("type", q); for (var ac in ai) { if (ai[ac] != Object.prototype[ac]) { if (ac.toLowerCase() == "styleclass") { Z.setAttribute("class", ai[ac]) } else { if (ac.toLowerCase() != "classid") { Z.setAttribute(ac, ai[ac]) } } } } for (var ab in ag) { if (ag[ab] != Object.prototype[ab] && ab.toLowerCase() != "movie") { e(Z, ab, ag[ab]) } } aa.parentNode.replaceChild(Z, aa); X = Z } } return X } function e(Z, X, Y) { var aa = C("param"); aa.setAttribute("name", X); aa.setAttribute("value", Y); Z.appendChild(aa) } function y(Y) { var X = c(Y); if (X && X.nodeName == "OBJECT") { if (M.ie && M.win) { X.style.display = "none"; (function () { if (X.readyState == 4) { b(Y) } else { setTimeout(arguments.callee, 10) } })() } else { X.parentNode.removeChild(X) } } } function b(Z) { var Y = c(Z); if (Y) { for (var X in Y) { if (typeof Y[X] == "function") { Y[X] = null } } Y.parentNode.removeChild(Y) } } function c(Z) { var X = null; try { X = j.getElementById(Z) } catch (Y) { } return X } function C(X) { return j.createElement(X) } function i(Z, X, Y) { Z.attachEvent(X, Y); I[I.length] = [Z, X, Y] } function F(Z) { var Y = M.pv, X = Z.split("."); X[0] = parseInt(X[0], 10); X[1] = parseInt(X[1], 10) || 0; X[2] = parseInt(X[2], 10) || 0; return (Y[0] > X[0] || (Y[0] == X[0] && Y[1] > X[1]) || (Y[0] == X[0] && Y[1] == X[1] && Y[2] >= X[2])) ? true : false } function v(ac, Y, ad, ab) { if (M.ie && M.mac) { return } var aa = j.getElementsByTagName("head")[0]; if (!aa) { return } var X = (ad && typeof ad == "string") ? ad : "screen"; if (ab) { n = null; G = null } if (!n || G != X) { var Z = C("style"); Z.setAttribute("type", "text/css"); Z.setAttribute("media", X); n = aa.appendChild(Z); if (M.ie && M.win && typeof j.styleSheets != D && j.styleSheets.length > 0) { n = j.styleSheets[j.styleSheets.length - 1] } G = X } if (M.ie && M.win) { if (n && typeof n.addRule == r) { n.addRule(ac, Y) } } else { if (n && typeof j.createTextNode != D) { n.appendChild(j.createTextNode(ac + " {" + Y + "}")) } } } function w(Z, X) { if (!m) { return } var Y = X ? "visible" : "hidden"; if (J && c(Z)) { c(Z).style.visibility = Y } else { v("#" + Z, "visibility:" + Y) } } function L(Y) { var Z = /[\\\"<>\.;]/; var X = Z.exec(Y) != null; return X && typeof encodeURIComponent != D ? encodeURIComponent(Y) : Y } var d = function () { if (M.ie && M.win) { window.attachEvent("onunload", function () { var ac = I.length; for (var ab = 0; ab < ac; ab++) { I[ab][0].detachEvent(I[ab][1], I[ab][2]) } var Z = N.length; for (var aa = 0; aa < Z; aa++) { y(N[aa]) } for (var Y in M) { M[Y] = null } M = null; for (var X in swfobject) { swfobject[X] = null } swfobject = null }) } } (); return { registerObject: function (ab, X, aa, Z) { if (M.w3 && ab && X) { var Y = {}; Y.id = ab; Y.swfVersion = X; Y.expressInstall = aa; Y.callbackFn = Z; o[o.length] = Y; w(ab, false) } else { if (Z) { Z({ success: false, id: ab }) } } }, getObjectById: function (X) { if (M.w3) { return z(X) } }, embedSWF: function (ab, ah, ae, ag, Y, aa, Z, ad, af, ac) { var X = { success: false, id: ah }; if (M.w3 && !(M.wk && M.wk < 312) && ab && ah && ae && ag && Y) { w(ah, false); K(function () { ae += ""; ag += ""; var aj = {}; if (af && typeof af === r) { for (var al in af) { aj[al] = af[al] } } aj.data = ab; aj.width = ae; aj.height = ag; var am = {}; if (ad && typeof ad === r) { for (var ak in ad) { am[ak] = ad[ak] } } if (Z && typeof Z === r) { for (var ai in Z) { if (typeof am.flashvars != D) { am.flashvars += "&" + ai + "=" + Z[ai] } else { am.flashvars = ai + "=" + Z[ai] } } } if (F(Y)) { var an = u(aj, am, ah); if (aj.id == ah) { w(ah, true) } X.success = true; X.ref = an } else { if (aa && A()) { aj.data = aa; P(aj, am, ah, ac); return } else { w(ah, true) } } if (ac) { ac(X) } }) } else { if (ac) { ac(X) } } }, switchOffAutoHideShow: function () { m = false }, ua: M, getFlashPlayerVersion: function () { return { major: M.pv[0], minor: M.pv[1], release: M.pv[2]} }, hasFlashPlayerVersion: F, createSWF: function (Z, Y, X) { if (M.w3) { return u(Z, Y, X) } else { return undefined } }, showExpressInstall: function (Z, aa, X, Y) { if (M.w3 && A()) { P(Z, aa, X, Y) } }, removeSWF: function (X) { if (M.w3) { y(X) } }, createCSS: function (aa, Z, Y, X) { if (M.w3) { v(aa, Z, Y, X) } }, addDomLoadEvent: K, addLoadEvent: s, getQueryParamValue: function (aa) { var Z = j.location.search || j.location.hash; if (Z) { if (/\?/.test(Z)) { Z = Z.split("?")[1] } if (aa == null) { return L(Z) } var Y = Z.split("&"); for (var X = 0; X < Y.length; X++) { if (Y[X].substring(0, Y[X].indexOf("=")) == aa) { return L(Y[X].substring((Y[X].indexOf("=") + 1))) } } } return "" }, expressInstallCallback: function () { if (a) { var X = c(R); if (X && l) { X.parentNode.replaceChild(l, X); if (Q) { w(Q, true); if (M.ie && M.win) { l.style.display = "block" } } if (E) { E(B) } } a = false } } } } ();


function playFLV (file,id,icon,w,h,skin,autostart) {
	if (skin == "undefined") {
		useskin = 'overlay.swf';
	} else {
		useskin = skin+'.swf';
	}
	
	if (document.getElementById(id)) {
		//do nothing
	} else {
		document.write('<div id="'+id+'"></div>');
	}
	
	fvars = 'file='+file+'&image='+icon+'&skin=/net/MediaPlayer/'+useskin;
	if (autostart) {
		fvars = fvars + '&autostart=true';
	}
	
	var s1 = new SWFObject('/net/MediaPlayer/player.swf','flv'+id,w,h,'9','#FFFFFF');
	s1.addParam('allowfullscreen','true');
	s1.addParam('allowscriptaccess','always');
	s1.addParam('flashvars',fvars);
	s1.write(id);
}

function playFLVPlayList (file,id,icon,w,h,skin) {
	if (skin == "undefined") {
		useskin = 'overlay.swf';
	} else {
		useskin = skin+'.swf';
	}

	document.write('<div id="video'+id+'"></div>');
	var s1 = new SWFObject('/net/MediaPlayer/player.swf','flv'+id,w,h,'9','#FFFFFF');
	s1.addParam('allowfullscreen','true');
	s1.addParam('allowscriptaccess','always');
	s1.addParam('flashvars','file='+file+'&playlist=bottom&frontcolor=cccccc&lightcolor=66cc00&skin=/net/MediaPlayer/'+useskin+'&backcolor=111111&playlistsize=200');


	s1.write('video'+id);
}

function displayFlashAdvanced (file,id,w,h,vars,ver,transp) {
	document.write('<div id="div'+id+'"></div>');
	var s1 = new SWFObject(file,id,w,h,ver,'#333333');
	s1.addParam('allowscriptaccess','always');
	s1.addParam('flashvars',vars);
	s1.addParam('quality','best');
	if (transp == true) {
		s1.addParam('wmode','transparent');
	}
	s1.addParam('scale','noscale');
	s1.addParam('salign','1');
	s1.write('div'+id);

}

function replaceDivWithFlash (file,id,w,h,vars,ver,transp,divid) {
	var s1 = new SWFObject(file,id,w,h,ver,'#FFFFFF');
	s1.addParam('allowscriptaccess','always');
	s1.addParam('flashvars',vars);
	s1.addParam('quality','best');
	if (transp == true) {
		s1.addParam('wmode','transparent');
	}
	s1.addParam('scale','noscale');
	s1.addParam('salign','1');
	s1.write(divid);
}

function getBrowserWH(wh) {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
    	//Non-IE
    	myWidth = window.innerWidth;
    	myHeight = window.innerHeight;
    	b = 'mozilla';
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    	//IE 6+ in 'standards compliant mode'
    	myWidth = document.documentElement.clientWidth;
    	myHeight = document.documentElement.clientHeight;
    	b = 'IE6';
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    	//IE 4 compatible
    	myWidth = document.body.clientWidth;
    	myHeight = document.body.clientHeight;
    	b = 'IE4';
	}
	
	if (wh == 'w') {
		return myWidth;
	} else if (wh == 'h') {
		return myHeight;
	}
}

function getBrowser(fB) {
	var browser = navigator.appName;
	var b_version = navigator.appVersion;
	var version = parseFloat(b_version);
	
	if (browser == "Microsoft Internet Explorer") {
		browserCode = "IE";
	} else if (browser == "Netscape") {
		browserCode = "NETSCAPE"
	}
	
	if (fB == 'name') {
		return browser;
	} else if (fB == 'version') {
		return version;
	} else if (fB == 'code') {
		return browserCode;
	}
}

function centerWindow(w,h,xy) {
	browserW = getBrowserWH('w');
	browserH = getBrowserWH('h');
	
	x = Math.round((browserW - w) / 2);
	y = Math.round((browserH - h) / 2);
	
	if (xy == 'x') {
		return x;
	} else {
		return y;
	}
	
}
/*
function itemBoxize(divs) {
	imgfolder = '/net/images/itembox';
	spacer = '<img src="/net/images/spacer.gif" width="1" height="1">';
	divarray = divs.split(',');
	
	for (i=0; i<divarray.length; i++) {
		divid = divarray[i];
		thisBox = getBoxifySource(divid,500,300)
//		alert(divid);
		
		if (document.getElementById(divid)) {
			
			name = document.getElementById(divid+'_name').innerHTML;
			link = document.getElementById(divid+'_link').innerHTML;
			if (document.getElementById(divid+'_linktarget')) {
				linktarget = document.getElementById(divid+'_linktarget').innerHTML;
			} else {
				linktarget = '';
			}
			imgurl = document.getElementById(divid+'_imgurl').innerHTML;
			imgw = document.getElementById(divid+'_imgw').innerHTML;
			imgh = document.getElementById(divid+'_imgh').innerHTML;
			desc = document.getElementById(divid+'_desc').innerHTML;
	
			x = '';
			x = x + '<table width="100%" cellpadding="0" cellspacing="0">';
			x = x + '	<tr>';
			x = x + '		<td width="11" height="17"><img src="'+imgfolder+'/product-topL.jpg" width="11" height="17"></td>';
			x = x + '		<td height="17" background="'+imgfolder+'/product-top.jpg">'+spacer+'</td>';
			x = x + '		<td width="12" height="17"><img src="'+imgfolder+'/product-topR.jpg" width="12" height="17"></td>';
			x = x + '	</tr>';
			x = x + '	<tr>';
			x = x + '		<td width="11" background="'+imgfolder+'/product-L.jpg">'+spacer+'</td>';
			x = x + '		<td><div class="browserTitle" style="font-family: Arial; font-size:20px; color:#ffffff; position: relative; top: -6px; width:100%; height:30px; background-image: url('+imgfolder+'/product-titlebgnotext.jpg); background-repeat: repeat-x;"><img src="/net/images/spacer.gif" width="12" height="1"><a href="'+link+'" target="'+linktarget+'">'+name+'</a></div></td>';
			x = x + '		<td width="12" background="'+imgfolder+'/product-R.jpg">'+spacer+'</td>';
			x = x + '	</tr>';
			x = x + '	<tr>';
			x = x + '		<td width="11" background="'+imgfolder+'/product-L.jpg">'+spacer+'</td>';
			x = x + '		<td height="16">'+spacer+'</td>';
			x = x + '		<td width="12" background="'+imgfolder+'/product-R.jpg">'+spacer+'</td>';
			x = x + '	</tr>';
			x = x + '	<tr>';
			x = x + '		<td width="11" background="'+imgfolder+'/product-L.jpg">'+spacer+'</td>';
			x = x + '		<td>';
			x = x + '			<table width="100%" height="150" cellpadding="0" cellspacing="0">';
			x = x + '				<tr>';
			x = x + '					<td width="10">'+spacer+'</td>';
			if (imgurl != '') {
				x = x + '					<td width="90" valign="top"><a href="'+link+'" target="'+linktarget+'"><img src="'+imgurl+'" ';
				if (imgw != '' && imgh != '') {
					x = x + ' width="'+imgw+'" height="'+imgh+'"';
				}
				x = x + ' border="0"></a></td>';
				x = x + '					<td width="20">'+spacer+'</td>';
			}
			x = x + '					<td valign="top">';
			x = x + '						'+desc;
			x = x + '					</td><td width="10">'+spacer+'</td>';
			x = x + '				</tr>';
			x = x + '			</table>';
			x = x + '		</td>';
			x = x + '		<td width="12" background="'+imgfolder+'/product-R.jpg">'+spacer+'</td>';
			x = x + '	</tr>';
			x = x + '	<tr>';
			x = x + '		<td width="11" height="17"><img src="'+imgfolder+'/product-botL.jpg" width="11" height="17"></td>';
			x = x + '		<td height="17" background="'+imgfolder+'/product-bot.jpg">'+spacer+'</td>';
			x = x + '		<td width="12" height="17"><img src="'+imgfolder+'/product-botR.jpg" width="12" height="17"></td>';
			x = x + '	</tr>';
			x = x + '</table>';
			
			document.getElementById(divid).innerHTML = x;
			document.getElementById(divid).style.visibility = 'visible';
		}
	}

}
*/

function itemBoxize(divs) {
	spacer = '<img src="/net/images/spacer.gif" width="1" height="1">';
	divarray = divs.split(',');
	
	for (i=0; i<divarray.length; i++) {
		divid = divarray[i];
		thisBoxSource = getBoxifySource(divid,500,100)
		
		if (document.getElementById(divid)) {
			
			name = document.getElementById(divid+'_name').innerHTML;
			link = document.getElementById(divid+'_link').innerHTML;
			if (document.getElementById(divid+'_linktarget')) {
				linktarget = document.getElementById(divid+'_linktarget').innerHTML;
			} else {
				linktarget = '';
			}
			imgurl = document.getElementById(divid+'_imgurl').innerHTML;
			imgw = document.getElementById(divid+'_imgw').innerHTML;
			imgh = document.getElementById(divid+'_imgh').innerHTML;
			desc = document.getElementById(divid+'_desc').innerHTML;

			x = '';
			x = x + '			<table width="100%" height="150" cellpadding="0" cellspacing="0">';
			x = x + '				<tr>';
			x = x + '					<td width="10">'+spacer+'</td>';
			if (imgurl != '') {
				x = x + '					<td width="90" valign="top"><a href="'+link+'" target="'+linktarget+'"><img src="'+imgurl+'" ';
				if (imgw != '' && imgh != '') {
					x = x + ' width="'+imgw+'" height="'+imgh+'"';
				}
				x = x + ' border="0"></a></td>';
				x = x + '					<td width="20">'+spacer+'</td>';
			}
			x = x + '					<td valign="top">';
			x = x + '						'+desc;
			x = x + '					</td><td width="10">'+spacer+'</td>';
			x = x + '				</tr>';
			x = x + '			</table>';

			document.getElementById(divid).innerHTML = thisBoxSource;
			document.getElementById(divid+'title').innerHTML = '<a href="'+link+'" target="'+linktarget+'" style="text-decoration: none">'+name+'</a>';
			document.getElementById(divid+'holder').innerHTML = x;
			
			document.getElementById(divid).style.visibility = 'visible';
			document.getElementById(divid).style.display = 'block';
		}
	}
}


function request(ji) {
	hu = window.location.search.substring(1);
	gy = hu.split("&");
	fResult = 1;
	
	for (i=0;i<gy.length;i++) {
		ft = gy[i].split("=");
		if (ft[0] == ji) {
			fResult = ft[1];
		}
	}
	
	return fResult;
}

function autoVideoInsert(videoid,flvurl,iconurl,skin) {
	if (videoid > 0) {
		imgtags = document.getElementsByTagName('img');
		
		for (it=0; it<imgtags.length; it++) {
			thissrc = imgtags[it].src;
			thissrc = thissrc.toLowerCase();
			if (thissrc.indexOf('videoplaceholder.jpg') > 0) {
				divid = imgtags[it].parentNode.id;
				playFLV (flvurl,divid,iconurl,400,300,skin);
			}
		}
		
		
	}
}

function getStates(country) {
	if (country == 'ca') {
		gp = 'AB:Alberta,BC:British Columbia,MB:Manitoba,NB:New Brunswick,NL:Newfoundland and Labrador,NT:Northwest Territories,NS:Nova Scotia,NU:Nunavut,ON:Ontario,PE:Prince Edward Island,QC:Quebec,SK:Saskatchewan,YT:Yukon';
	} else if (country == 'us') {
		gp = 'AL:ALABAMA,AK:ALASKA,AS:AMERICAN SAMOA,AZ:ARIZONA,AR:ARKANSAS,CA:CALIFORNIA,CO:COLORADO,CT:CONNECTICUT,DE:DELAWARE,DC:DISTRICT OF COLUMBIA,FM:FEDERATED STATES OF MICRONESIA,FL:FLORIDA,GA:GEORGIA,GU:GUAM,HI:HAWAII,ID:IDAHO,IL:ILLINOIS,IN:INDIANA,IA:IOWA,KS:KANSAS,KY:KENTUCKY,LA:LOUISIANA,ME:MAINE,MH:MARSHALL ISLANDS,MD:MARYLAND,MA:MASSACHUSETTS,MI:MICHIGAN,MN:MINNESOTA,MS:MISSISSIPPI,MO:MISSOURI,MT:MONTANA,NE:NEBRASKA,NV:NEVADA,NH:NEW HAMPSHIRE,NJ:NEW JERSEY,NM:NEW MEXICO,NY:NEW YORK,NC:NORTH CAROLINA,ND:NORTH DAKOTA,MP:NORTHERN MARIANA ISLANDS,OH:OHIO,OK:OKLAHOMA,OR:OREGON,PW:PALAU,PA:PENNSYLVANIA,PR:PUERTO RICO,RI:RHODE ISLAND,SC:SOUTH CAROLINA,SD:SOUTH DAKOTA,TN:TENNESSEE,TX:TEXAS,UT:UTAH,VT:VERMONT,VI:VIRGIN ISLANDS,VA:VIRGINIA,WA:WASHINGTON,WV:WEST VIRGINIA,WI:WISCONSIN,WY:WYOMING';
	}
	
	return gp;
}

function getPosition(obj) {
	var curleft = curtop = 0;
	
	if (obj.offsetParent) {
		curleft = obj.offsetLeft;
		curtop = obj.offsetTop;
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		}
	}
	xy = curleft + ',' + curtop;
	xyarr = xy.split(',');
	xyarr[0] = parseInt(xyarr[0]);
	xyarr[1] = parseInt(xyarr[1]);
	
	return xyarr;
}

function fieldLimiter(obj,limit,statusObj) {
	thisStr = obj.value;
	thisLen = thisStr.length;
	
	if (statusObj != undefined && statusObj != '') {
		statusObj.innerHTML = '(' + thisLen + '/'+limit+' chars)';
	}
	
	if (thisLen > limit) {
		thisStr = thisStr.slice(0,limit);
		obj.value = thisStr;
	}
}

function animObj(fObjName,fAction) {
	thisobj = document.getElementById(fObjName);
	if (fAction == 'open') {
		openObj(fObjName);
	} else if (fAction == 'close') {
		closeObj(fObjName);
	} else if (fAction == 'fadein') {
		fadeInObj(fObjName);
	} else if (fAction == 'fadeout') {
		fadeOutObj(fObjName);
	}
}

function openObj(fObjName) {
	thisobj = document.getElementById(fObjName);
	target = thisobj.scrollHeight;
	cur = thisobj.offsetHeight;
	
	dif = Math.round((target - cur) / 4);
	if (dif < 1) {
		thisobj.style.height = target+'px';;
		getBrowser();
	} else {
		newH = cur + dif;
		thisobj.style.height = newH +'px';
		setTimeout("openObj('"+fObjName+"')",10);
	}
	
}

function closeObj(fObjName) {
	thisobj = document.getElementById(fObjName);
	target = 1;
	cur = thisobj.offsetHeight;

	dif = Math.round((cur - target) / 4);
	if (dif < 1) {
		thisobj.style.height = target+'px';;
	} else {
		newH = cur - dif;
		thisobj.style.height = newH +'px';
		setTimeout("closeObj('"+fObjName+"')",10);
	}
}

function fadeInObj(fObjName) {
	thisobj = document.getElementById(fObjName);
	target = 10;
	
	if (getBrowser('code') == "IE") {
	} else if (getBrowser('code') == "NETSCAPE") {
		cur = thisobj.style.opacity * 10;
		dif = target - cur;
		inc = target / 100;
		if (dif > 0) {
			newO = cur + inc;
			thisobj.style.opacity = (newO / 10);
			setTimeout("fadeInObj('"+fObjName+"')",10);
		}
	}
}

function fadeOutObj(fObjName) {
	thisobj = document.getElementById(fObjName);
	target = 0;
	
	if (getBrowser('code') == "IE") {
	} else if (getBrowser('code') == "NETSCAPE") {
		cur = thisobj.style.opacity * 10;
		dif = cur - target;
		inc = 10 / 100;
		if (dif > 0) {
			newO = cur - inc;
			thisobj.style.opacity = (newO / 10);
			setTimeout("fadeOutObj('"+fObjName+"')",10);
		}
	}
}

function validateEmailAddress(str) {
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
	    return false
	}

	 if (str.indexOf(at,(lat+1))!=-1){
	    return false
	 }

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
	    return false
	 }

	 if (str.indexOf(dot,(lat+2))==-1){
	    return false
	 }
	
	 if (str.indexOf(" ")!=-1){
	    return false
	 }

	 return true					
}


function swapImg(thisObj, fAction, fOnCode, fSrc, fExt) {
	if (fAction == 'on') {
		thisSrc = fSrc + fOnCode + '.' + fExt;
	} else {
		thisSrc = fSrc + '.' + fExt;
	}
	
	thisObj.src = thisSrc;
}

function setCursor(obj,fStatus) {
	if (fStatus == 'on') {
		obj.style.cursor = 'pointer';
	} else if (fStatus == 'off') {
		obj.style.cursor = 'default';
	}
}
