function build_scene_preview(p_movie, p_scene, p_movie_link, p_members) {
	p_movie = String(100 + p_movie).substring(1,3);
	p_scene = String(100 + p_scene).substring(1,3);

	var movie_x = eval("movie_"+p_movie+"_00.split('|')");
	var scene_x = eval("movie_"+p_movie+"_"+p_scene+".split('|')");

	join_link = 'http://www.janswebring.com/goto.php?dest=register&s_id=880';
	if (p_members) {
		movie_link = 'http://holypornstar.janswebring.com/members/movies/'+scene_x[1]+'/'+scene_x[2]+'.mpg';
		pic_path = '../pics/captures/';
	}
	else {
		movie_link = join_link;
		pic_path = 'pics/captures/';
	}

	document.write('<table border="0" cellpadding="0" class="tab-scene" width="735">');
	document.write('	<tr>');
	document.write('		<td align="center" height="25">');
	document.write('			<span style="font-size: 14px;"><b>'+scene_x[3]+'</b> - '+movie_x[0]+' / '+scene_x[0]+'</span>');
	document.write('		</td>');
	document.write('	</tr>');
	document.write('	<tr>');
	document.write('		<td align="center">');
	document.write('			<table border="0" cellpadding="1" cellspacing="0" width="1">');
	document.write('				<tr valign="top">');
	document.write('					<td>');
	document.write('						<table border="0" cellpadding="0" cellspacing="0" class="pic-border">');
	document.write('							<tr>');
	document.write('								<td><img src="'+pic_path+scene_x[2]+'_1.jpg" width="200" height="150"></td>');
	document.write('								<td><img src="'+pic_path+scene_x[2]+'_2.jpg" width="200" height="150"></td>');
	document.write('							</tr>');
	document.write('							<tr>');
	document.write('								<td><img src="'+pic_path+scene_x[2]+'_3.jpg" width="200" height="150"></td>');
	document.write('								<td><img src="'+pic_path+scene_x[2]+'_4.jpg" width="200" height="150"></td>');
	document.write('							</tr>');
	document.write('							<tr>');
	document.write('								<td><img src="'+pic_path+scene_x[2]+'_5.jpg" width="200" height="150"></td>');
	document.write('								<td><img src="'+pic_path+scene_x[2]+'_6.jpg" width="200" height="150"></td>');
	document.write('							</tr>');
	document.write('						</table>');
	document.write('					</td>');
	document.write('					<td>');
	document.write('						<img src="'+pic_path+scene_x[2]+'_7.jpg" width="300" height="225" class="pic-border">');
	document.write('						<div align="justify" style="padding: 3px;">');
	document.write('							<b>Title:</b> '+movie_x[0]+' / '+scene_x[0]+'<br>');
	document.write('							<b>Studio:</b> '+movie_x[3]+'<br>');
	document.write('							<b>Time/Length:</b> '+scene_x[5]+' min / '+scene_x[6]+' Mb<br>');
	document.write('							<b>Performers:</b> '+scene_x[4]+'<br>');
	document.write('							<br>');
	document.write('							<b>Description:</b><br>');
	document.write('							'+scene_x[7]);
	document.write('							<br><br><br>');
	document.write('							<center>');
	document.write('							<b>');
	if (p_movie_link)
		document.write('		<a href="movie.html?movie='+parseInt(p_movie)+'">VIEW ALL MOVIE</a> / ');
	document.write('			<a href="'+movie_link+'">DOWNLOAD HERE</a>');
	document.write('							</b>');
	document.write('							</center>');
	document.write('						</div>');
	document.write('					</td>');
	document.write('				</tr>');
	document.write('			</table>');
	document.write('		</td>');
	document.write('	</tr>');
	if (!p_members) {
		document.write('	<tr>');
		document.write('		<td align="center" height="80">');
		document.write('		<br>');
		document.write('		<a href="'+join_link+'"><img src="files/clickhere.gif" border="0" width="568" height="58"></a>');
		document.write('		</td>');
		document.write('	</tr>');
	}
	else {
		document.write('	<tr><td height="10"></td></tr>');
	}
	document.write('</table>');
	document.write('<br><br>');
}

function buld_movie_preview(p_movie, p_scenes_link, p_members) {
	p_movie = String(100 + p_movie).substring(1,3);

	var movie_x = eval("movie_"+p_movie+"_00.split('|')");
	join_link = 'http://www.janswebring.com/goto.php?dest=register&s_id=880';
	if (p_members)
		pic_path = '../pics/covers/';
	else
		pic_path = 'pics/covers/';

	document.write('<table border="0" cellpadding="0" cellspacing="0" class="tab-scene" width="735">');
	document.write('	<tr><td colspan="5" height="10"></td></tr>');
	document.write('	<tr valign="top">');
	document.write('		<td width="9"></td>');
	document.write('		<td width="1"><img src="'+pic_path+movie_x[1]+'_back.jpg" width="180" height="259" class="pic-border"></td>');
	document.write('		<td width="1"><img src="'+pic_path+movie_x[1]+'_front.jpg" width="180" height="259" class="pic-border"></td>');
	document.write('		<td style="padding: 5px;">');
	document.write('			<span style="font-size: 22px;">'+movie_x[0]+'</span>');
	document.write('			<br><br>');
	document.write('			<b>Studio:</b> '+movie_x[3]+'<br>');
	document.write('			<b>Length:</b> '+movie_x[6]+' min<br>');
	document.write('			<b>Size:</b> '+movie_x[5]+' Mb');
	document.write('			<br><br>');
	document.write('			<b>Performers: </b>'+movie_x[4]);
	document.write('			<br><br>');
	document.write('			<b>Description:</b> '+movie_x[7]);
	document.write('		</td>');
	document.write('		<td width="9"></td>');
	document.write('	</tr>');
	if (p_members) {
		if (p_scenes_link) {
		document.write('	<tr>');
		document.write('		<th colspan="5" align="center" height="60">');
		document.write('			<a href="movie.html?movie='+parseInt(p_movie)+'">>> CLICK HERE TO SEE ALL THIS MOVIE <<</a>');
		document.write('		</th>');
		document.write('	</tr>');
		}
		else {
		document.write('	<tr><th colspan="5" height="10"></th></tr>');
		}
	}
	else { 
		document.write('	<tr>');
		document.write('		<th colspan="5" align="center" height="90">');
		document.write('			<a href="'+join_link+'"><img src="files/clickhere.gif" width="568" height="58" border="0"></a>');
		document.write('		</th>');
		document.write('	</tr>');
	}
	document.write('</table>');
	document.write('<br><br>');
}

function build_intro() {
	document.write('<div style="width: 710px;">');
	document.write('<b>Welcome to Holy Pornstar</b><br>');
	document.write('<b>Holy Pornstar</b> is part of <b>Jans!Webring</b>, one of the largest adult network on the Internet. With your JANS! ID you will enter ');
	document.write('the member areas of our sites without any extra fees or restrictions.');
	document.write('Download as many movies as you want. There are absolutely no limits and download managers are totally welcomed! New movies are added everyday and new sites');
	document.write('always join!<br>');
	document.write('24/7 friendly support: We are proud to take care about all your questions and inquires everyday and everytime!');
	document.write('</div>');
}

function build_bottom_text() {
	document.write('<div style="width: 550px;">');
	document.write('<b>The Largest Online Collection of Adult Content!</b><br>');
	document.write('Jans!Webring has over 210+ sites covering a wide variety of content. Our categories range from softcore fetishes to some of the best ');
	document.write('hardcore action around. With your JANS ID, you\'ll be able to download as many files as you want without any kind of limitation!');
	document.write('</div>');
}

function build_right() {
	document.write('<div style="padding: 7px;">');
	document.write('<a href="http://www.janswebring.com/usc2257.php">18 U.S.C. 2257 Record-Keeping Requirements Compliance Statement</a><br>');
	document.write('copyrights holypornstar & janswebring.com 2006');
	document.write('</div>');
}

function build_members_menu() {
	document.write('<b>Navigate</b>:&nbsp;');
	document.write('<a href="/members/">Home</a> | ');
	document.write('<a href="http://www.janswebring.com/vs_sites.php">Site Directory</a> | ');
	document.write('<a href="http://www.janswebring.com/vs_faq.php">Support</a> | ');
	document.write('<a href="http://www.janswebring.com/vs_contact_webmaster.php?cat=toprated&pindex=1&s_id=880">Contact Me</a>');
}

function IsNumeric(sText) {
	var ValidChars = "0123456789";
	var IsNumber=true;
	var Char;
	
	for (i = 0; i < sText.length && IsNumber == true; i++) {
		Char = sText.charAt(i);
		if (ValidChars.indexOf(Char) == -1)
			IsNumber = false;
	}
	return IsNumber;
}
function get_page(param, max_page) {
	ret = 1;
	p = document.location.href.split("?");

	if (p.length > 1) {
		p = p[1].split("&");
		p = p[0].split("=");

		if (p.length > 1 && p[0] == param) {
			if (IsNumeric(p[1])) {
				if (p[1] <= 1)
					ret = 1;
				else {
					if (p[1] >= max_page)
						ret = max_page;
					else
						ret = parseInt(p[1]);
				}
			}
		}
	}
	return ret;
}