document.write('<style type="text/css">');
document.write('.allaround {background-color:transparent;border:1px solid #000000;}');
document.write('.preview506 {width:180px; float:left; color:#FFFFFF;');
document.write('margin:3px; padding:0px; cursor:default; font-family: arial; font-size: 12px; background-color: #000000;}');
document.write('.preview506 table {font-size:12px;font-family: arial;width:100%;height:100%; border:0px solid #FFFFFF; }');
document.write('.preview506 img {width:136px;height:102px; border:1px solid #FFFFFF; }');
document.write('.preview506 .previewimage {text-align:center;}');
document.write('.preview506 .cam2cam {text-decoration:none;font-family: arial;font-size:12px; text-align:center; color: #F113DC ;border:0px solid orange;}');
document.write('.preview506 a#showname {text-decoration:none;padding-left:3px;font-weight:bold;font-family: arial; font-size:12px; text-align:center; color: #FF0000 ;border:0px solid orange;}');
document.write('.preview506 .right {text-decoration:none;float:right; font-family: arial; border:0px solid #FF0000;}');
document.write('.preview506 .previewshow {text-decoration:none;text-align:center; font-family: arial; border:0px solid #FF0000;}');
document.write('.preview506 td#showname {text-decoration:none;padding-left:3px;font-weight:bold;font-family: arial; font-size:12px; text-align:center; color: #FF0000 ;border:0px solid orange;}');
document.write('.preview506 td#description {padding-left:3px;font-size:12px;text-decoration:none;font-family: arial; text-align: center; color: #FFFFFF;height:12px; border:0px solid #FF0000;}');
document.write('.preview506 a#online {text-decoration:none;padding-left:3px;text-align:center;font-weight:bold;font-family: arial;list-style-type:disc; font-size:12px; color:#00FF00;}');
document.write('.preview506 a#offline {text-decoration:none;padding-left:3px;text-align:center;list-style-type:disc; font-family: arial; font-size:12px; color:#8C8C8C;}');
document.write('.preview506 .clear {clear:both;}');
document.write('.preview506 .description {padding-left:3px;font-size:12px;text-decoration:none;font-family: arial; text-align: center; color: #FFFFFF;height:12px; border:0px solid #FF0000;}');
document.write('.preview506 td#description {padding-left:3px;font-size:12px;text-decoration:none;font-family: arial; text-align: center; color: #FFFFFF;height:12px; border:0px solid #FF0000;}');
document.write('.preview506 a#description {padding-left:3px;font-size:12px;text-decoration:none;font-family: arial; text-align: center; color: #FFFFFF;height:12px; border:0px solid #FF0000;}');
document.write('.preview506 a#setcard {padding-right:3px;font-size:12px;text-decoration:none;font-family: arial; color:#EA4612; border:0px solid #FF0000;}');
document.write('.column{width:140px;}');
document.write('</style>');
var showlist = new Array();
showlist.push(new show(5023, 'Susicam', 'I love latex, leather, high-heels, whips, bondage and anything to do with feet. ...', 'I love latex, leathe...', true, 'http://mm.777partner.com/images/1265068_137x102.jpg', 0, 'P97527', 'http://mm.777partner.com/images/1310004_137x102.jpg'));
showlist.push(new show(259, 'fetisha', 'Ich mag M&auml;nner mit Stil und Niveau, die wissen, was Frauen m&ouml;gen und wissen, w...', 'Ich mag M&auml;nner mit ...', true, 'http://mm.777partner.com/images/1012195_137x102.jpg', 0, 'P97527', 'http://mm.777partner.com/images/1264414_137x102.jpg'));
showlist.push(new show(17404, 'yassira', 'Life is wonderful - with lots of sex!', 'Life is wonderful - ...', true, 'http://mm.777partner.com/images/1547585_137x102.jpg', 1, 'P97527', 'http://mm.777partner.com/images/1380364_137x102.jpg'));
showlist.push(new show(19502, 'Jeniferxxx', 'Looking for a hot woman? Then come to me!', 'Looking for a hot wo...', true, 'http://mm.777partner.com/images/1579574_137x102.jpg', 1, 'P97527', 'http://mm.777partner.com/images/1579575_137x102.jpg'));

		
			/**
			 *
			 *  Base64 encode / decode
			 *  http://www.webtoolkit.info/
			 *
			 **/
			 
			var Base64 = {
			 
				// private property
				_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
			 
				// public method for encoding
				encode : function (input) {
					var output = "";
					var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
					var i = 0;
			 
					input = Base64._utf8_encode(input);
			 
					while (i < input.length) {
			 
						chr1 = input.charCodeAt(i++);
						chr2 = input.charCodeAt(i++);
						chr3 = input.charCodeAt(i++);
			 
						enc1 = chr1 >> 2;
						enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
						enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
						enc4 = chr3 & 63;
			 
						if (isNaN(chr2)) {
							enc3 = enc4 = 64;
						} else if (isNaN(chr3)) {
							enc4 = 64;
						}
			 
						output = output +
						this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
						this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
			 
					}
			 
					return output;
				},
			 
				// public method for decoding
				decode : function (input) {
					var output = "";
					var chr1, chr2, chr3;
					var enc1, enc2, enc3, enc4;
					var i = 0;
			 
					input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
			 
					while (i < input.length) {
			 
						enc1 = this._keyStr.indexOf(input.charAt(i++));
						enc2 = this._keyStr.indexOf(input.charAt(i++));
						enc3 = this._keyStr.indexOf(input.charAt(i++));
						enc4 = this._keyStr.indexOf(input.charAt(i++));
			 
						chr1 = (enc1 << 2) | (enc2 >> 4);
						chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
						chr3 = ((enc3 & 3) << 6) | enc4;
			 
						output = output + String.fromCharCode(chr1);
			 
						if (enc3 != 64) {
							output = output + String.fromCharCode(chr2);
						}
						if (enc4 != 64) {
							output = output + String.fromCharCode(chr3);
						}
			 
					}
			 
					output = Base64._utf8_decode(output);
			 
					return output;
			 
				},
			 
				// private method for UTF-8 encoding
				_utf8_encode : function (string) {
					string = string.replace(/\r\n/g,"\n");
					var utftext = "";
			 
					for (var n = 0; n < string.length; n++) {
			 
						var c = string.charCodeAt(n);
			 
						if (c < 128) {
							utftext += String.fromCharCode(c);
						}
						else if((c > 127) && (c < 2048)) {
							utftext += String.fromCharCode((c >> 6) | 192);
							utftext += String.fromCharCode((c & 63) | 128);
						}
						else {
							utftext += String.fromCharCode((c >> 12) | 224);
							utftext += String.fromCharCode(((c >> 6) & 63) | 128);
							utftext += String.fromCharCode((c & 63) | 128);
						}
			 
					}
			 
					return utftext;
				},
			 
				// private method for UTF-8 decoding
				_utf8_decode : function (utftext) {
					var string = "";
					var i = 0;
					var c = c1 = c2 = 0;
			 
					while ( i < utftext.length ) {
			 
						c = utftext.charCodeAt(i);
			 
						if (c < 128) {
							string += String.fromCharCode(c);
							i++;
						}
						else if((c > 191) && (c < 224)) {
							c2 = utftext.charCodeAt(i+1);
							string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
							i += 2;
						}
						else {
							c2 = utftext.charCodeAt(i+1);
							c3 = utftext.charCodeAt(i+2);
							string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
							i += 3;
						}
			 
					}
			 
					return string;
				}
			 
			}
			
			var $image = parseInt(1);
			var $description = parseInt(1);
			var $name = parseInt(1);
			var $cam2cam = parseInt(1);
			var $setcardlink = parseInt(0);
			//var $querystring = '&stid=w_bannermycam_' + camid + '&id=P97527&l=P97527&h=off&nohead=0';
			var colspan = 2;
			
			function openSetcardLink_506(camid){
				mypage  = 'http://www.777livecams.com/?show=';
				t = mypage.substr((mypage.length - 1), mypage.length);
				if(t != '?') mypage += camid + '&';
				mypage += 'culture=en';
				// gallery
				//mypage += '&targeturl=' + escape(Base64.encode('index.php?id=P97527&menuid=gallery&camid=' + camid));
				// chat
				mypage += '&targeturl=' + escape(Base64.encode('index.php?id=P97527&showchat=' + camid));
				mypage += '&stid=mycambanner_'  + camid + '_m&id=P97527&l=P97527&h=off&nohead=0';
				myname 	 = '_blank';
				winprops = 'top=0,left=0,height=600,width=970,scrollbars=yes,status=no,location=yes,menubar=no,resizable=yes,toolbar=yes';
				//window.alert(mypage);
				win 	 = window.open(mypage, myname, winprops);
				if (parseInt(navigator.appVersion) >= 4) { 
					win.window.focus(); 
				}
			}
			
			function show(id, name, description, shortdescription, cam2cam, previewurl, online, affiliateid, changepreviewurl) {
				this.id = id;
				this.name = name;
				this.description = description;
				this.shortdescription = shortdescription;
				this.cam2cam = cam2cam;
				this.previewurl = previewurl;
				this.online = online;
				this.affiliateid = affiliateid;
				this.changepreviewurl = changepreviewurl;
		
				this.printid = printid;
				this.printname = printname;
				this.printdescription = printdescription;
				this.printpreviewimage = printpreviewimage;
				this.printpreviewlink = printpreviewlink;
				this.printsetcardlink = printsetcardlink;
				this.printonline = printonline;
				this.printcam2cam = printcam2cam;
		
				this.display = display;
		
				function printid() { document.write(this.id); }
				function printname() { document.write(this.name); }
				function printdescription() { document.write(this.description); }
				function printpreviewimage() { document.write('<img src="' + this.previewurl + '" border="0">'); }
				function printpreviewlink() {
					document.write('<a target="_blank" href="' + this.setcard + '&id=' + this.affiliateid + '">');
					document.write('<img src="' + this.previewurl + '" border="0">');
					document.write('</a>');
				}
				function printsetcardlink() { 
					document.write('<a target="_blank" href="' + this.setcard + '&id=' + this.affiliateid + '">Sedcard</a>'); 
				}
				
				function printonline() {
					if (this.online) {
						document.write('now live online');
					}
					else {
						document.write('Soon back online');
					}
				}
				function printcam2cam() {
					if (this.cam2cam) {
						document.write('cam2cam');
					}
					else {
						document.write('&nbsp;');
					}
				}
				function display () {
					document.write('id: ' + this.id);
					document.write('<br>name: ' + this.name);
					document.write('<br>description: ' + this.description);
					document.write('<br>cam2cam: ' + this.cam2cam);
					document.write('<br>preview: <img src="' + this.previewurl + '" border="0">');
					document.write('<br>setcard: <a target="_blank" href="' + this.setcard + '">setcard</a>');
				}
				
				
			}
			
			function changePreviewImg(sImg, sSrc){
				//alert(sImg.src);
				if(sImg.src != sSrc){
					sImg.src = sSrc;
				}
			}
		   				
			function smartCaption(text, length) {
				if (text.length > length) {
					return text.substr(0, length-3) + '...';
				}
				else {
					return text;
				}
			}
			/**
			* ausgabe des banners
			*/
			
			document.write('<table class="allaround" border="0" cellpadding="0" cellspacing="1">');
			document.write('<tr><td>');
			for (var i = 0; i < showlist.length; i++) {
				document.write('<div class="preview506">');
				document.write('<table class="previewshow" border="0" cellpadding="0" cellspacing="1" class="preview506">');
				
				/**
				* shownamen ein oder aus
				*/
				document.write('<tr>');
				document.write('<td colspan="2" id="showname"><div class="showname" ');
				document.write(' title="' + showlist[i].name + '">');
			   	if($name != 0){
			   		document.write('<a id="showname" onclick="openSetcardLink_506(' + showlist[i].id + ');" href="#"');
				    document.write(' title="' + showlist[i].name + '">');
				    document.write( smartCaption(showlist[i].name, 15) );
				    document.write('</a>');
				}
				else {
					document.write('&nbsp;');
				}
				//document.write('</div>');
		    	document.write('</td>');
		    	document.write('</tr>');
				
				
				/**
				* VorschauBild ein oder aus
				*/
				if($image !== 0){
					document.write('<tr><td colspan="2">');
		 		   	document.write('<div class="previewimage">');
		    		document.write('<a onclick="openSetcardLink_506(' + showlist[i].id + ');" href="javascript:void(0);"');
				    document.write(' title="Come into my live show ..." ');
				    document.write('>');
				    document.write('<img border="0" src="' + showlist[i].previewurl + '" ');
					document.write(' alt="' + showlist[i].name + '" ');
					document.write(' onmouseover="changePreviewImg(this, \'' + showlist[i].changepreviewurl + '\');" onmouseout="changePreviewImg(this, \'' + showlist[i].previewurl + '\');"');
					document.write(' /></a>');
				    document.write('</div>');
				    document.write('</td></tr>');
				}
				
			    /**
			    * beschreibung ein oder aus
			   	*/
				if($description != 0){
					document.write('<tr><td colspan="2">');
					document.write('<div ');
					if (showlist[i].description.length > 20) {
		    			document.write(' title="' + showlist[i].description + '"');
		    		}
		    		document.write('>');
		    		document.write('<a id="description" onclick="openSetcardLink_506(' + showlist[i].id + ');" href="javascript:void(0);"');
				    document.write(' title="' + showlist[i].description + '">');
				    document.write( showlist[i].shortdescription );
		   			document.write('</a>');
				    document.write('</div>');
		    		document.write('</td></tr>');
				}
			    
				/**
				* zeile mit onlinehinweis und setcard link
				*/ 
				document.write('<tr>');
				if($setcardlink != 0){
					document.write('<td colspan="1" nowrap ');
				}
				else {
					document.write('<td colspan="2" nowrap> ');
				}
				document.write('<div ');
				if (showlist[i].online == 1) {
					document.write('<div>');
					document.write('<a id="online" onclick="openSetcardLink_506(' + showlist[i].id + ');" href="javascript:void(0);"');
				    document.write(' title="Visit me, now in my live show">');
				    document.write('now live online!!');
				    document.write('</a>');
					document.write('<div>');
			    }
	    		else {
	        		document.write('<div>');
					document.write('<a id="offline" onclick="openSetcardLink_506(' + showlist[i].id + ');" href="javascript:void(0);"');
				    document.write(' title="Unfortunately, I am currently not online, but my colleague is for you aviable!!">');
				    document.write('Soon back online');
				    document.write('</a>');
					document.write('<div>');
	    		}
	 		    document.write('</td>');
	 		   	
			    
				/**
				* setcardlink ein oder aus
				*/
				if($setcardlink !== 0){
					document.write('<td nowrap>');
					document.write('<div class="right">');
		    		document.write('<a id="setcard" ');
		    		document.write('title="hier lernst Du mich naeher kennen" ');
		    		document.write('onclick="openSetcardLink_506(' + showlist[i].id + ');" href="javascript:void(0);">');
		    		document.write('more infos</a>');
				    document.write('</div>');
				    document.write('</td>');
				}
				document.write('</tr>');
	    		document.write('</table>');
			    document.write('</div>');
			}
			document.write('<div style="clear:both;">&nbsp;</div>');
			document.write('</td></tr></table>');
