// IMAGE SWAP FUNCTIONS

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


// POP-UP SCRIPTS

function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}


// POP-UPS MADE WITH DREAMWEAVER
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



// Show RoseCam Schedule

function schedule() {
   window.open("","schedule","toolbar=no,width=515,height=500,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no,left=40,top=40");
}






// Exit PopUp Script
// PopUp array

if (window.Array) {
  var ar = new Array();
  ar[0] = "http://www.cutelatina.com/popups/partners.shtml";
//  ar[0] = "http://www.wildamber.com/popups/pop01/index.shtml";
//  ar[1] = "http://www.wildamber.com/popups/coolsites.shtml";
//  ar[2] = "http://www.wildamber.com/popups/pop01/index2.shtml";
}


function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else {
    begin += 2;
  }
  var end = document.cookie.indexOf(";", begin);
  if (end == -1) end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}


function getPopUp() {
  var now = new Date();
  now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
  var popup = getCookie("popup");
  if (!popup) {
    popup = 0;
  } else {
    popup = parseInt(popup) + 1;
    if (popup >= ar.length) popup = 0;
  }
  setCookie("popup", popup, now);
  return ar[popup];
}


// PopUp version 1.0 June 7, 2000


function exit() {
var popWhat = 'http://www.cumtasteit.com/cum/index.shtml' ;
var daWidth = screen.availWidth  ;
var daHeight = screen.availHeight - 180 ;

PopWin = window.open(popWhat,"exitWindow","resizable=yes,'width='+ daWidth + ',height=' + daHeight + ',scrollbars=yes,status=yes,screenX=5,screenY=5,left=5,top=5");
PopWin.blur();
// if (PopWin && PopWin.open) PopWin.location.href = getPopUp();
 }
 
 
 
 // Function to target the opener window from the popup window
 
 function launch(newUrl, newName, newFeatures, orgName) {   
 var remote = open(newUrl, newName, newFeatures);
 if (remote.opener == null) // if something went wrong
 remote.opener = window;
 remote.opener.name = orgName;
 return remote;
 }


// Weekly Pics popups

var faux = null;
var pic = new Image(); 

function openWeek(pic) {
  faux = launch('','weeklypics','dependent,resizable,scrollbars=yes,top=0,left=0,screenX=0,screenY=0,width=600,height=600','main');
  var fd = faux.document;
  fd.open("text/html", "replace");
  fd.write('<html><head><title>My Pics</title><BASE TARGET="main">');
  fd.write('<LINK REL=StyleSheet HREF="http://www.wildamber.com/style_amber.css" TYPE="text/css"></head>');
  fd.write('<body bgcolor="#ffffff">');
  fd.write('<div align="center">');
  fd.write('<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">');
  fd.write('<tr align="center"><td align="center" valign="middle"><img src="' + 'pics/' + pic + '.jpg"></></td></tr>');
  fd.write('<tr align="center"><td><a href="http://cgi.ynotnetwork.com/top50.cgi?wamber"><img src="http://www.wildamber.com/banners/ynot_banner3.jpg" width="425" height="69" border="0" alt="YNOT Click here for more free videos!"></td></tr></a>');
  fd.write('</div>');
  fd.write('</table></body></html>');
  fd.close();
}


// Close weekly pics popups onUnload - notice we target the variable faux=popup window

 function closeWeek() {
 if (faux && faux.open && !faux.closed) faux.close();
 }

function nasty() {
nasty=window.open('http://www.nastyfriends.com/cgi-bin/arp/rankem.cgi?id=wamber','nasty','toolbar=1,menubar=1,scrollbars=1,status=1,resizable=1,top=1,left=1,width=760,height=420');
nasty.blur();
}




