/* the scripts */

navgfx = new Array('main','about','model','sgarmy','girls','boards','hookup', 'groups', 'calendar','words','pics','videos','help');
litgfx = new Array( navgfx.length );
nrmgfx = new Array( navgfx.length );
gfxpre = '/media/site/nav/';
		
for( i = 0; i < navgfx.length; i++ ) {
	litgfx[ i ] = new Image();
	litgfx[ i ].src = gfxpre + navgfx[ i ] + '_over.gif';
	nrmgfx[ i ] = new Image();
	nrmgfx[ i ].src = gfxpre + navgfx[ i ] + '.gif';
}
		
function litup( gfx ) {
	for( i = 0; i < navgfx.length; i++ ) {
		if ( navgfx[ i ] == gfx ) {
			document.images[ gfx ].src = litgfx[ i ].src;		
		}	
	}
}
		
function trnof( gfx ) {
	for( i = 0; i < navgfx.length; i++ ) {
		if ( navgfx[ i ] == gfx ) {
			document.images[ gfx ].src = nrmgfx[ i ].src;		
		}	
	}
}

function goGirl(loc,sel) {
	i=document.girlform[sel].selectedIndex;
	f=document.girlform[sel].options[i].value
	if (f != 0) {
		location.href= "/girls/" + f;
	}
}

var isNav4, isIE4, isMac, isNav6;

if( parseInt( navigator.appVersion.charAt( 0 )) >= 4) {
	isNav4 = ( navigator.appName == "Netscape" && parseInt( navigator.appVersion ) != 5 ) ? true : false
	isNav6 = ( navigator.appName == "Netscape" && parseInt( navigator.appVersion ) == 5 ) ? true : false
	isIE4 = ( navigator.appName.indexOf( "Microsoft" ) != -1 ) ? true : false
	isMac = ( navigator.platform.indexOf( "Mac" ) != -1 ) ? true : false
}
		
function doSubWin( url, winWidth, winHeight ) {
	if( isNav4 || isIE4 ) {
		var screenPosX,screenPosY;
		screenPosX = ( screen.availWidth - winWidth ) / 2;
		screenPosY = ( screen.availHeight - winHeight ) / 2;
				
		if( isNav4 ) {
			window.open( url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width=' + winWidth + ',height=' + winHeight + ',screenX=' + screenPosX + ',screenY=' + screenPosY );
		}
			
		if( isIE4 ) {
			newwin = window.open( url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width=' + winWidth + ',height=' + winHeight + ',left=' +screenPosX+ ',top=' + screenPosY );
		}
	} else {
		window.open( url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1, copyhistory=0,width=' + winWidth + ',height=' + winHeight );
	}
}
function doCamSubWin( url, winWidth, winHeight, winName ) {
	if( isNav4 || isIE4 ) {
		var screenPosX,screenPosY;
		screenPosX = ( screen.availWidth - winWidth ) / 2;
		screenPosY = ( screen.availHeight - winHeight ) / 2;
				
		if( isNav4 ) {
			window.open( url, winName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width=' + winWidth + ',height=' + winHeight + ',screenX=' + screenPosX + ',screenY=' + screenPosY );
		}
			
		if( isIE4 ) {
			newwin = window.open( url, winName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, copyhistory=0,width=' + winWidth + ',height=' + winHeight + ',left=' +screenPosX+ ',top=' + screenPosY );
		}
	} else {
		window.open( url, winName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1, copyhistory=0,width=' + winWidth + ',height=' + winHeight );
	}
}
function doScrollSubWin( url, winWidth, winHeight ) {
	if( isNav4 || isIE4 ) {
		var screenPosX,screenPosY;
		screenPosX = ( screen.availWidth - winWidth ) / 2;
		screenPosY = ( screen.availHeight - winHeight ) / 2;
				
		if( isNav4 ) {
			window.open( url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0, copyhistory=0,width=' + winWidth + ',height=' + winHeight + ',screenX=' + screenPosX + ',screenY=' + screenPosY );
		}
			
		if( isIE4 ) {
			newwin = window.open( url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0, copyhistory=0,width=' + winWidth + ',height=' + winHeight + ',left=' +screenPosX+ ',top=' + screenPosY );
		}
	} else {
		window.open( url, 'subwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1, copyhistory=0,width=' + winWidth + ',height=' + winHeight );
	}
}
function x () {
return;
}
		
function DoSmilie(addSmilie) {
	var revisedMessage;
	var currentMessage = document.REPLIER.message.value;
	revisedMessage = currentMessage+addSmilie;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
}

function DoPrompt(action) {
	var revisedMessage;
	var currentMessage = document.REPLIER.message.value;


	if (action == "url") {
	var thisURL = prompt("", "http://");
	var thisTitle = prompt("Enter the title of the web page you are linking.  For example, if you entered http://suicidegirls.com, you might use 'SuicideGirls'.", "web page");
	var urlforumcode = "[URL="+thisURL+"]"+thisTitle+"[/URL]";
	revisedMessage = currentMessage+urlforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}
	
	if (action == "email") {
	var thisEmail = prompt("Enter the complete email address that you wish to add.", "");
	var emailforumcode = "[EMAIL]"+thisEmail+"[/EMAIL]";
	revisedMessage = currentMessage+emailforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}
	
	if (action == "bold") {
	var thisBold = prompt("Enter the text that you wish to make bold.", "");
	var boldforumcode = "[B]"+thisBold+"[/B]";
	revisedMessage = currentMessage+boldforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}
	
	if (action == "italics") {
	var thisItal = prompt("Enter the text that you wish to italicize.", "");
	var italforumcode = "[I]"+thisItal+"[/I]";
	revisedMessage = currentMessage+italforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}
	
	if (action == "image") {
	var thisImage = prompt("Enter the complete URL for the image you wish to display.", "http://");
	var imageforumcode = "[IMG]"+thisImage+"[/IMG]";
	revisedMessage = currentMessage+imageforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}
	
	if (action == "quote") {
	var quoteforumcode = "[QUOTE]  [/QUOTE]";
	revisedMessage = currentMessage+quoteforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}
	
	if (action == "code") {
	var codeforumcode = "[CODE]  [/CODE]";
	revisedMessage = currentMessage+codeforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}

	if (action == "liststart") {
	var liststartforumcode = "[LIST]";
	revisedMessage = currentMessage+liststartforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}
	
	if (action == "listend") {
	var listendforumcode = "[/LIST]";
	revisedMessage = currentMessage+listendforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}
	if (action == "listitem") {
	var thisItem = prompt("Enter the new list item.  Note that each list group must be preceeded by a List Start and the entire list group must end with a List End (in order to display properly).", "");
	var itemforumcode = "[LISTITEM]"+thisItem+"[/LISTITEM]";
	revisedMessage = currentMessage+itemforumcode;
	document.REPLIER.message.value=revisedMessage;
	document.REPLIER.message.focus();
	return;
	}
	
}
