// JavaScript Document
/****************popitup********************************/
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_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_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); 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];}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/****************popitup********************************/
function popitup(url)
{
	newwindow=window.open(url,'name','height=350,width=400');
	if (window.focus) {newwindow.focus()}
	return false;
}
/*****************Titulo************************************/
var message = new Array();
// Set your messages below -- follow the pattern.
// To add more messages, just add more elements to the array.
message[0] = "Weddings photo";
message[1] = "Weddings video";
message[2] = "Weddings on Riviera Maya";
message[3] = "Your wedding web page";
message[4] = "Weddings couple and familly shots";
message[5] = "We give you all in 48 hours";
message[6] = "CD or DVD with all photos taken";

// Set the number of repetitions (how many times the arrow
// cycle repeats with each message).
var reps = 2;
var speed = 600;  // Set the overall speed (larger number = slower action).

// DO NOT EDIT BELOW THIS LINE.
var p = message.length;
var T = "";
var C = 0;
var mC = 0;
var s = 0;
var sT = null;
if (reps < 1) reps = 1;
function doTheThing() {
T = message[mC];
A();
}
function A() {
s++;
if (s > 11) { s = 1;}
// you can fiddle with the patterns here...
if (s == 1) { document.title = '*C* '+T+' -----'; }
if (s == 2) { document.title = '*CA* '+T+' -----'; }
if (s == 3) { document.title = '*CAR* '+T+' -----'; }
if (s == 4) { document.title = '*CARI* '+T+' -----'; }
if (s == 5) { document.title = '*CARIB* '+T+' -----'; }
if (s == 6) { document.title = '*CARIBE* '+T+' -----'; }
if (s == 7) { document.title = '*CARIBEP* '+T+' -----'; }
if (s == 8) { document.title = '*CARIBEPH* '+T+' -----'; }
if (s == 9) { document.title = '*CARIBEPHO* '+T+' -----'; }
if (s == 10) { document.title = '*CARIBEPHOT* '+T+' -----'; }
if (s == 11) { document.title = '*CARIBEPHOTO* '+T+' -----'; }
if (C < (11 * reps)) {
sT = setTimeout("A()", speed);
C++;
}
else {
C = 0;
s = 0;
mC++;
if(mC > p - 1) mC = 0;
sT = null;
doTheThing();
   }
}
doTheThing();
/**************Muestra Texto************************************/
function muestraTEXTO(mensaje)
{
	info=document.getElementById("contenido");
	info.innerHTML=mensaje;
}
/**************Muestra encabezado************************************************/
function muestraEncab(mensaje)
{
	encabe.innerHTML=mensaje;
}
/******************************************************/
function getPageScroll()
{

	var yScroll;

	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}

	arrayPageScroll = new Array('',yScroll) 
	return arrayPageScroll;
}
function getPageSize(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}


	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}
function ocultaMensaje()
{
	divTransparente.style.display="none";
}
function muestraMensaje(mensaje)
{
	divMensaje.innerHTML=mensaje;
	divTransparente.style.display="block";
}
/********************Mostrar Servicio***********************************************/
function mostrar_servicio(caso)
{
divTransparente=document.getElementById("transparencia");
divMensaje=document.getElementById("transparenciaMensaje");

    var arrayPageSize = getPageSize();
	var arrayPageScroll = getPageScroll();
	divTransparente.onclick = function () {ocultaMensaje(); return false;}
	divTransparente.style.width=arrayPageSize[0]+'px';
	divTransparente.style.height=arrayPageSize[1]+'px';
    
    //var lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - 32) / 2);
	//var lightboxLeft = ((arrayPageSize[0] - 20 - 32) / 2);
	
	
	var lightboxLeft=(arrayPageSize[0]-780)/2;
	var navegador=navigator.appName;
	
	/****************Detectar los navegadores devuelve true or false******************
    **Firefox detector 2/3
    *  FF=/a/[-1]=='a';
	*
	**Safari detector
    *  Saf=/a/.__proto__=='//
	*
	**IE detector
	*  IE='\v'=='v';
	**Chrome
	*  Chr=/source/.test((/a/.toString+''));
	*
	*************************************************************************************/
	
    Chr=/source/.test((/a/.toString+''));
    divMensaje.style.top = "115px";
	if(navegador=="Microsoft Internet Explorer" || Chr==true)
	{
	 divMensaje.style.left = lightboxLeft+"px";
	}
	else
	 {	 
	  divMensaje.style.left = (lightboxLeft-7.5)+"px";
	 }
	
var texto="<div id='marco'><div id='marco_izq'><div id='frame'><div class='titulo'>Photography</div><div class='descripcion'>Caribephoto provides a team of professional photographers specializing in weddings and events that are focused on capturing feelings and telling a story in a natural manner, making sure that unique moments remain unforgettable memories.</div></div><div id='frame'><div class='titulo'>Online Gallery</div><div class='descripcion'>Just like the Stream Video you can also get a web page with the 30 best shots of your wedding to show or send to your friends and family just the next day. It will be on line for 20 days.</div></div><div id='frame'><div class='titulo'>Additional photographer</div><div class='descripcion'>If you do not want to miss an instant of your wedding you may order a second photographer and get ALL shots by both photographers.</div></div><div id='frame'><div class='titulo'>Photo/video sessions</div><div class='descripcion'>During your dream vacation take advantage of the paradisiacal locations in the Mayan Riviera that are ideal for a photo or video session with your loved ones. Whether on honeymoon, anniversary or just spending time with your family or friends, this will be picture perfect images to remember. We offer several packages to choose from and are happy to work with your ideas to make it truly memorable.</div></div></div><div id='marco_der'><div id='frame'><div class='titulo'>Streaming wedding video</div><div class='descripcion'>From the video of your wedding we can create a web page with a streaming video file of the most memorable moments of your ceremony to be online the next day. It is the perfect way for your friends and family, unable to join you, to enjoy your big day. It will be available online for one week.</div></div><div id='frame'><div class='titulo'>Photo - Video Montage</div><div class='descripcion'>We can produce a slide show or video file with the best images and the soundtrack of your preference. It is the perfect way to share your memories on a big screen at a gathering with friends and family back home.</div></div><div id='frame'><div class='titulo'>Videographer</div><div class='descripcion'>Wedding videography can do more than just document the day; the video camera can be used to tell a story. After professional video editing the resulting narrative can be transferred to videotape or DVD to ensure that the events of the day remain captured in time. A videographer will capture the magical moments of your special event so you can relive them over and over.</div></div><div id='frame'><div class='titulo'>Ecological Photo Albums and Frames</div><div class='descripcion'>We offer a distinctive selection of handmade albums and frames including the Riviera Maya name carved on wood in a variety of sizes. Extraordinary pieces for safekeeping your invaluable memories as well as the perfect gift for friends and family.</div></div></div></div></div>";
    muestraMensaje(texto);	
}

/********************Cambia contenido***********************************************/
function cambiar_contenido(caso)
{
info=document.getElementById("contenido");

 switch(caso)
 {
   case "about": var texto="<div id='about_izq'><img src='images/photo_about.jpg' alt='about us' align='top' /></div><div id='marco'><p align='justify'>Caribephoto brings together a team of qualified photography professionals who delicately capture your destination wedding for you, your family and friends to enjoy. Based in Playa del Carmen, we are proud to have served over 1500 satisfied couples in Riviera Maya, Mexico. </p>When dedication, creativity and high end equipment coincide the end result is your complete satisfaction.</p> </p>We use digital cameras 12 mpx quality and higher. To ensure a complete and optimal service we manage the entire process as we have our own developing laboratory.</p><p>Photographing worldwide.</p><p align='center' class='style1'><span class='style3'>Contact +00 52 984 803 5415<br /><br /><a href='mailto:info@caribephoto.com'>info@caribephoto.com</a></span></p><p align='center'></p><p align='center' class='style1'>&nbsp;</p></div>";
   
     muestraTEXTO(texto);break;
  
  case "faq": var texto="<div id='about_izq'><img src='images/photo_faq.jpg' alt='asbout us' align='top' /><img src='images/photo_faq002.JPG' /></div><div id='about_der'><p align='justify'><span class='style3'><strong><font color='#ffc20e'>How long does it take to see all my wedding pictures on the internet?</font></strong></span><br />It takes 48 hours after the day of your wedding to see the best selection of pictures in the internet for you and your family to enjoy.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'>How can we reserve and pay for the photography packages?</font></strong></span><br />If you want to buy a package you must advance 25% of the total price which you can pay via PAYPAL and cover the remaining balance upon receipt of your package.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'>What is the cancellation policy of my wedding photographer?</font></strong></span><br />If you cancel the reservation of your package a refund does not apply because the photographer would have turned away other potential clients for that day.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'>What type of equipment will the photographer use to photograph my wedding? </font></strong></span><br />Our photographers use digital cameras of 8 mpx large fine shot so you can get the best quality. But if you prefer film shooting you may ask for the service.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'>Do you photograph in colour or black and white? </font> </strong></span><br />We take photographs in colour so you may have the option of full colour, black and white or sepia tone digitally altered. We also provide black and white film if you prefer it.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'> Who processes the film and prints the photographs? </font></strong></span><br />We have our own photo laboratory using the highest quality standards, so at the end of the session of photographs, our photographer brings the film or memory card to the lab and we take care of the process of developing and printing. Each image is individually treated for colour and exposure to provide you with the highest quality prints available.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'>Can we upgrade our package after we book our wedding photographer?</font></strong></span><br />Yes! But if you book one photography package and request an upgrade, it may imply and additional charge. Please let your photographer know that you have changed the package so that he/she may assist you.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'>How long does the photographer stay with us at our wedding?</font></strong></span><br />The photographer stays with you for approximately one hour and a half. He or she is there before the ceremony photographing the groom, the arrival of the guests and the arrival of the bride. Then he/she films the entire ceremony and finally stays to complete the family photo session, guests and bride and groom together. If you require more time for additional pictures, you have to pay for an extra hour which you should reserve with the photographer in advance.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'>How many wedding photographers come with the package?</font></strong></span><br />There is only one wedding photographer for each wedding package; an additional wedding photographer is available with every wedding package for an additional cost.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'>How long does it take for the wedding photos to be processed and delivered?</font></strong></span><br />It takes at least 48 hours for you to have the pictures after the wedding day.</p><p align='justify'><span class='style3'><strong><font color='#ffc20e'>Will the pictures be printed in matte or glossy paper?</font></strong></span><br />You may choose which you prefer when selecting your package or you can let your photographer know at the wedding.<p align='justify'><span class='style3'><strong><font color='#ffc20e'>We would like to have an extra album with printed photos for some one special in our family, would that be possible?</font></strong></span><br /> Yes, additional empty albums cost 30 dollars, but if you would like the complete album including photographs please ask for a quote given that prices vary depending on picture size.</p><p><span class='style17'><strong><font color='#ffc20e'>Additional questions or comments please email us at info@caribephoto.com</font></strong></span><br /></p></div>";
     muestraTEXTO(texto);break;
	 
	 case "stream": var texto="<table><tr><td valign='top'><p>You can find here your stream video, remember it will be available on line for a week. You can also check it in your broswer at high speed or low speed.</p><p>&nbsp;</p><p align='left'><span class='style15'>Ashley and Mervin </span></p><p align='left'><a href='stream_Ashley.html' target='_blank' >high speed </a></p><p align='left'><a href='stream_mervin.html' target='_blank'>low speed <font color='#aaaaaa'> </font></a></p><p align='left'>&nbsp;</p><p align='left'><span class='style15'>Chrystal and Dustin </span><span class='style15'></span></p><p align='left'><a href='stream_chrystal.html' target='_blank'>high speed </a></p><p align='left'><a href='stream_dustin.html' target='_blank'>low speed</a></p></td></tr></table>";
     muestraTEXTO(texto);break;
	 
	 case "servicios": var texto="<div id='about_izq'><img src='images/photo_services.jpg' alt='asbout us' align='top'/></div><div id='marco'><div class='titulo'>Photography</div><div class='descripcion'>Caribephoto provides a team of professional photographers specializing in weddings and events that are focused on capturing feelings and telling a story in a natural manner, making sure that unique moments remain unforgettable memories.</div><div class='titulo'>Streaming wedding video</div><div class='descripcion'>From the video of your wedding we can create a web page with a streaming video file of the most memorable moments of your ceremony to be online the next day. It is the perfect way for your friends and family, unable to join you, to enjoy your big day. It will be available online for one week.</div><div class='titulo'>Online Gallery</div><div class='descripcion'>Just like the Stream Video you can also get a web page with the 30 best shots of your wedding to show or send to your friends and family just the next day. It will be on line for 20 days.</div><div class='titulo'>Photo - Video Montage</div><div class='descripcion'>We can produce a slide show or video file with the best images and the soundtrack of your preference. It is the perfect way to share your memories on a big screen at a gathering with friends and family back home.</div><div class='titulo'>Additional photographer</div><div class='descripcion'>If you do not want to miss an instant of your wedding you may order a second photographer and get ALL shots by both photographers.</div><div class='titulo'>Videographer</div><div class='descripcion'>Wedding videography can do more than just document the day; the video camera can be used to tell a story. After professional video editing the resulting narrative can be transferred to videotape or DVD to ensure that the events of the day remain captured in time. A videographer will capture the magical moments of your special event so you can relive them over and over.</div><div class='titulo'>Photo/video sessions</div><div class='descripcion'>During your dream vacation take advantage of the paradisiacal locations in the Mayan Riviera that are ideal for a photo or video session with your loved ones. Whether on honeymoon, anniversary or just spending time with your family or friends, this will be picture perfect images to remember. We offer several packages to choose from and are happy to work with your ideas to make it truly memorable.</div><div class='titulo'>Ecological Photo Albums and Frames</div><div class='descripcion'>We offer a distinctive selection of handmade albums and frames including the Riviera Maya name carved on wood in a variety of sizes. Extraordinary pieces for safekeeping your invaluable memories as well as the perfect gift for friends and family.</div></div></div>";
	muestraTEXTO(texto);break;
 }
}
function desplegar(categoria)
{
var menu = document.getElementById(categoria);

		if(menu.className == "ver_menu")
		 {
		  menu.className = "ocultar_menu";
		 }
		 else{
			  menu.className = "ver_menu";
			}
}


function videoG()
{
	document.location.href="packages.php?pos=x";
}
function ecologicaALbum()
{
	document.location.href="productos.php?pos=x";
}
function photosession()
{
  document.location.href="productos.php?pos=ps";
}
function streamvideo()
{
	document.location.href="videos.html";
}
function streamslideshow()
{
 	document.location.href="slideshow.html";
}
function cerrar()
{
 document.getElementById('box').style.display="none";
 document.getElementById('lienzo').style.display="none";
 document.getElementById("afterRegistro").style.display="none";
 document.getElementById("infodiv").style.visibility = "hidden";
 document.getElementById("infodiv").innerHTML="";
}

