//** Updated Oct 7th, 07 to version 2.0. Contains numerous improvements:
//   -Added Auto Mode: Script auto rotates the tabs based on an interval, until a tab is explicitly selected
//   -Ability to expand/contract arbitrary DIVs on the page as the tabbed content is expanded/ contracted
//   -Ability to dynamically select a tab either based on its position within its peers, or its ID attribute (give the target tab one 1st)
//   -Ability to set where the CSS classname "selected" get assigned- either to the target tab's link ("A"), or its parent container 

////NO NEED TO EDIT BELOW////////////////////////

function ddtabcontent(tabinterfaceid){
	this.tabinterfaceid=tabinterfaceid; //ID of Tab Menu main container
	this.tabs=$(tabinterfaceid).getElementsByTagName("a"); //Get all tab links within container
	this.enabletabpersistence=true;
	this.hottabspositions=[]; //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container
	this.subcontentids=[]; //Array to store ids of the sub contents ("rel" attr values)
	this.revcontentids=[]; //Array to store ids of arbitrary contents to expand/contact as well ("rev" attr values)
	this.selectedClassTarget="link"; //keyword to indicate which target element to assign "selected" CSS class ("linkparent" or "link")
}

ddtabcontent.getCookie=function(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1]; //return its value
	return "";
}

ddtabcontent.setCookie=function(name, value){
	document.cookie = name+"="+value+";path=/"; //cookie value is domain wide (path=/)
}

ddtabcontent.prototype={

	expandit:function(tabid_or_position){ //PUBLIC function to select a tab either by its ID or position(int) within its peers
		this.cancelautorun(); //stop auto cycling of tabs (if running)
		var tabref="";
		try{
			if (typeof tabid_or_position=="string" && $(tabid_or_position).getAttribute("rel")) //if specified tab contains "rel" attr
				tabref=$(tabid_or_position);
			else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel")) //if specified tab contains "rel" attr
				tabref=this.tabs[tabid_or_position];
		}
		catch(err){alert("Invalid Tab ID or position entered!")}
		if (tabref!="") //if a valid tab is found based on function parameter
			this.expandtab(tabref); //expand this tab
	},

	setpersist:function(bool){ //PUBLIC function to toggle persistence feature
			this.enabletabpersistence=bool;
	},

	setselectedClassTarget:function(objstr){ //PUBLIC function to set which target element to assign "selected" CSS class ("linkparent" or "link")
		this.selectedClassTarget=objstr || "link";
	},

	getselectedClassTarget:function(tabref){ //Returns target element to assign "selected" CSS class to
		return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref;
	},

	expandtab:function(tabref){
		var subcontentid=tabref.getAttribute("rel"); //Get id of subcontent to expand
		//Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easily search through
		var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : "";
		this.expandsubcontent(subcontentid);
		this.expandrevcontent(associatedrevids);
		for (var i=0; i<this.tabs.length; i++){ //Loop through all tabs, and assign only the selected tab the CSS class "selected"
			this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)? "selected" : "";
		}
		if (this.enabletabpersistence) //if persistence enabled, save selected tab position(int) relative to its peers
			ddtabcontent.setCookie(this.tabinterfaceid, tabref.tabposition);
	},

	expandsubcontent:function(subcontentid){
		for (var i=0; i<this.subcontentids.length; i++){
			var subcontent=$(this.subcontentids[i]); //cache current subcontent obj (in for loop)
			subcontent.style.display=(subcontent.id==subcontentid)? "block" : "none"; //"show" or hide sub content based on matching id attr value
		}
	},


	expandrevcontent:function(associatedrevids){
		var allrevids=this.revcontentids;
		for (var i=0; i<allrevids.length; i++){ //Loop through rev attributes for all tabs in this tab interface
			//if any values stored within associatedrevids matches one within allrevids, expand that DIV, otherwise, contract it
			$(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)? "block" : "none";
		}
	},

	autorun:function(){ //function to auto cycle through and select tabs based on a set interval
		var currentTabIndex=this.automode_currentTabIndex; //index within this.hottabspositions to begin
		var hottabspositions=this.hottabspositions; //Array containing position numbers of "hot" tabs (those with a "rel" attr)
		this.expandtab(this.tabs[hottabspositions[currentTabIndex]]);
		this.automode_currentTabIndex=(currentTabIndex<hottabspositions.length-1)? currentTabIndex+1 : 0; //increment currentTabIndex
	},

	cancelautorun:function(){
		if (typeof this.autoruntimer!="undefined")
			clearInterval(this.autoruntimer);
	},

	init:function(automodeperiod){
		var persistedtab=ddtabcontent.getCookie(this.tabinterfaceid); //get position of persisted tab (applicable if persistence is enabled)
		var persisterror=true; //Bool variable to check whether persisted tab position is valid (can become invalid if user has modified tab structure)
		this.automodeperiod=automodeperiod || 0;
		for (var i=0; i<this.tabs.length; i++){
			this.tabs[i].tabposition=i; //remember position of tab relative to its peers
			if (this.tabs[i].getAttribute("rel")){
				var tabinstance=this;
				this.hottabspositions[this.hottabspositions.length]=i; //store position of "hot" tab ("rel" attr defined) relative to its peers
				this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel"); //store id of sub content ("rel" attr value)
				this.tabs[i].onclick=function(){
					tabinstance.expandtab(this);
					tabinstance.cancelautorun(); //stop auto cycling of tabs (if running)
					return false
				}
				if (this.tabs[i].getAttribute("rev")){ //if "rev" attr defined, store each value within "rev" as an array element
					this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/));
				}
				if (this.enabletabpersistence && parseInt(persistedtab)==i || !this.enabletabpersistence && this.getselectedClassTarget(this.tabs[i]).className=="selected"){
					this.expandtab(this.tabs[i]); //expand current tab if it's the persisted tab, or if persist=off, carries the "selected" CSS class
					persisterror=false; //Persisted tab (if applicable) was found, so set "persisterror" to false
					//If currently selected tab's index(i) is greater than 0, this means its not the 1st tab, so set the tab to begin in automode to 1st tab:
					this.automode_currentTabIndex=(i>0)? 0 : 1;
				}
			}
		} //END for loop
		if (persisterror) //if an error has occured while trying to retrieve persisted tab (based on its position within its peers)
			this.expandtab(this.tabs[this.hottabspositions[0]]); //Just select first tab that contains a "rel" attr
		if (parseInt(this.automodeperiod)>500 && this.hottabspositions.length>1){
			this.automode_currentTabIndex=this.automode_currentTabIndex || 0;
			this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod);
		}
	} //END int() function

} //END Prototype assignment


// ** FIN tabContent *********************************************** //

// Función para pasar a la pestaña de Inscripción, preseleccionando el campo de Consultar.
function irConsultar(tab)
{
	if(!$chk(tab))
		tab = 'tabInscripcion';
	
	// Instancio mi objeto ddtabcontent
	var myflowers=new ddtabcontent("flowertabs");
	myflowers.setpersist(false);
	myflowers.init();
	myflowers.expandtab($(tab));
	myflowers.cancelautorun();
	
	if(tab = 'tabInscripcion')
	{
		$('dispOn').checked = true;
		corregirCmbFechas();
	}
}

// Función que se ejecuta al cambiar el combo de los cursos, y actualizar el combo de las fechas.
function startAjax(paq) {
	var x = document.form1.curso.value;
	var f = document.form1.modalidad.value;
	
	if (f == "D"){
		$('astDir').innerHTML = "*";
	} else if (f == "P"){
		$('astDir').innerHTML = "";
	}
	
	$("cmbFecha").innerHTML = "<div class='tit_toc' align='center'><img src=images/load-inscr.gif></div>";
	
	var request = new Request({
				'url'		:	"ajaxCmbInscripcion.php",
				'data'		:	"toc="+x+"&modalidad="+f,
				'onSuccess'	:	function(html) {
							// Lleno el combo fechas con lo obtenido de Ajax.
							$('cmbFecha').innerHTML = html;
		
							// Si el valor del combo fechas es Consultar, marco que tengo que mostrar la disponibilidad.
							if (document.form1.fechaInicio.value == "Consultar")
							{
								$('dispOn').checked = true;
								AjaxDisp();
							}
							else // De lo contrario, lo destildo.
							{
								$('dispOn').checked = false;
								AjaxDisp();
							}
							
							// Seteo el formato del combo según lo tildado previamente.
							setCmbFechaEstilo();
				}
		});
	
	request.send();
	
	if (paq != "paq"){
		$("cmbPaquetes").innerHTML = "<div class='tit_toc' align='center'><img src=images/load-inscr.gif></div>";
		
		var request2 = new Request({
					'url'		:	"ajaxPaquetesInscripcion.php",
					'data'		:	"toc="+x,
					'onSuccess'	:	function(html) {
								
								$('cmbPaquetes').innerHTML = html;
								
								var myTips = new Tips($$('.toolTipElement'), {
										timeOut: 700,
										maxTitleChars: 50,
										maxOpacity: .9
								});
					}
			});
		
		request2.send();
	}
}

function verPaquete() {
	var x = document.form1.paquete.value;
	document.getElementById('promo').setAttribute("onClick", "StkU('pp','','"+x+"');");
	
	document.form1.paqueteSeleccionado.value = x;
}
	
// MUESTRA U OCULTA CAMPOS PARA EMPRESAS
function AjaxEmpresa() {
	var request = new Request({
			'url'		:	"ajaxEmpresaInscripcion.php",
			'onSuccess'	:	function(html) {
						empOn = getRadioButtonSelectedValue(document.form1.empresaOn);
						if (empOn == "true")
							$("empresaDiv").innerHTML = html;
						else
							$("empresaDiv").innerHTML = "";
			}
	});
	
	request.send();
}
// EMPRESA o PARTICULAR
function getRadioButtonSelectedValue(ctrl)
{
    for(i=0;i<ctrl.length;i++)
        if(ctrl[i].checked)
			return ctrl[i].value;
}


// Muestra u oculta campos de alumnos adicionales
// Muestra datos de descuentos
function ajaxCantidad() {
		var xar = document.form1.cantidadAlumnos.value;
		
		if (xar == 4) {
			$("tr_2").style.display = "table-row";
			$("tr_22").style.display = "table-row";
			$("tr_3").style.display = "table-row";
			$("tr_33").style.display = "table-row";
			$("tr_4").style.display = "table-row";
			$("tr_44").style.display = "table-row";
			$("tr_2T").style.display = "none";
			$("tr_2T2").style.display = "table-row";			
			$("tr_222").style.display = "table-row";
			$("tr_333").style.display = "table-row";
			$("tr_444").style.display = "table-row";
			$("costo").innerHTML = "<span style=\"color:#FF0000; font-weight:bold;\">15% OFF Cada uno</span>";
		}
		if (xar == 3) {
			$("tr_2").style.display = "table-row";
			$("tr_22").style.display = "table-row";
			$("tr_3").style.display = "table-row";
			$("tr_33").style.display = "table-row";
			$("tr_4").style.display = "none";
			$("tr_44").style.display = "none";
			$("tr_2T").style.display = "none";
			$("tr_2T2").style.display = "table-row";
			$("tr_222").style.display = "table-row";
			$("tr_333").style.display = "table-row";
			$("tr_444").style.display = "none";				
			document.form1.nombreAlumno4.value = "";
			document.form1.apellidoAlumno4.value = "";
			$("costo").innerHTML = "<span style=\"color:#FF0000; font-weight:bold;\">10% OFF Cada uno</span>";
		}	
		if (xar == 2) {
			$("tr_2").style.display = "table-row";
			$("tr_22").style.display = "table-row";
			$("tr_3").style.display = "none";
			$("tr_33").style.display = "none";
			$("tr_4").style.display = "none";
			$("tr_44").style.display = "none";
			$("tr_2T").style.display = "table-row";
			$("tr_2T2").style.display = "none";
			$("tr_222").style.display = "table-row";
			$("tr_333").style.display = "none";
			$("tr_444").style.display = "none";
			document.form1.nombreAlumno3.value = "";
			document.form1.apellidoAlumno3.value = "";
			document.form1.nombreAlumno4.value = "";
			document.form1.apellidoAlumno4.value = "";
			$("costo").innerHTML = "<span style=\"color:#FF0000; font-weight:bold;\">5% OFF Cada uno</span>";
		}
		if (xar == 1) {
			$("tr_2").style.display = "none";
			$("tr_22").style.display = "none";
			$("tr_3").style.display = "none";
			$("tr_33").style.display = "none";
			$("tr_4").style.display = "none";
			$("tr_44").style.display = "none";
			$("tr_2T").style.display = "none";
			$("tr_2T2").style.display = "none";
			$("tr_222").style.display = "none";
			$("tr_333").style.display = "none";
			$("tr_444").style.display = "none";
			document.form1.nombreAlumno2.value = "";
			document.form1.apellidoAlumno2.value = "";
			document.form1.nombreAlumno3.value = "";
			document.form1.apellidoAlumno3.value = "";
			document.form1.nombreAlumno4.value = "";
			document.form1.apellidoAlumno4.value = "";
			$("costo").innerHTML = "";
		}
}


// DISPONIBILIDAD
function AjaxDisp() {
		// Busco el valor del combo de fechas.
		var v = document.form1.fechaInicio.value;
		
		// Si dicho valor es Consultar, marco que tengo que mostrar la disponibilidad.
		if (v == "Consultar")
			$('dispOn').checked = true;
		else
			$('dispOn').checked = false;
		
		// Instancio mi objeto Request de MooTools
		var request = new Request({
				'url'		:	"ajaxDisponibilidadInscripcion.php",
				'data'		:	"disp="+$('dispOn').checked,
				'onSuccess'	:	function(html) {
							if ($('dispOn').checked) // Si tengo que mostrar la disponibilidad, cargo los datos que traigo de Ajax.
								$("disponibilidad").innerHTML = html;
							else // Sino, muestro todo como lo tenía anteriormente.
								$("disponibilidad").innerHTML = "<table width='530' border='0' align='center' cellpadding='0' cellspacing='0' bgcolor='#F4F4F4' style='border:#cccccc 1px solid;'><tr><td height='10' colspan='4'></td></tr><tr><td width='10'>&nbsp;</td><td valign='top' height='20' class='txt_ora'><strong>:: DISPONIBILIDAD</strong></td><td width='350'><table width='100%' border='0' cellpadding='0' cellspacing='0' class='textos' style=' margin-left:3px; margin-right:3px; width:350px;'><tr><td width='26' align='left'><input name='dispOn' type='checkbox' id='dispOn' onclick='corregirCmbFechas();' /></td><td>(Marcar solo si no puede cursar ninguna de las fechas)</td></tr></table></td><td width='10'>&nbsp;</td></tr><tr><td height='10' colspan='4'></td></tr></table>";
				}
		});
		// Envío la petición Ajax.
		request.send();
}

// Función que modifica el item seleccionado del combo fechas, dependiendo el estado que se marque del checkbox de Disponibilidad.
function corregirCmbFechas()
{
	if($('dispOn').checked)
	{
		document.form1.fechaInicio.selectedIndex = $('form1').fechaInicio.length - 1;
		AjaxDisp();
	}
	else
	{
		document.form1.fechaInicio.selectedIndex = 0;
		AjaxDisp();
	}
	
	setCmbFechaEstilo();
}

// Función para setear el estilo del combo de fechas seguún la opción elegida.
function setCmbFechaEstilo()
{
	if($('dispOn').checked)
		document.form1.fechaInicio.setStyles({
					'color'			:	'#F00'
		});
	else
		document.form1.fechaInicio.setStyles({
					'color'			:	''
		});
}


// FUNCION PARA LLENAR COMBO DE PROVINCIAS
function cmbpais() {
	// Obtengo el valor del combo Pais.
	var pais = document.form1.pais.value;
	
	// Instancio mi objeto Request de MooTools.
	var request = new Request({
				'url'		:	"ajaxCmbprov.php",
				'data'		:	"id="+pais,
				'onSuccess'	:	function(html) {
						// Cargo el contenido obtenido por medio de Ajax.
						$("cmbProv").innerHTML = html;
				}
	});
	
	// Imagen Loading, se remplaza cuando termina de cargar.
	$("cmbProv").innerHTML = "<table width=100%><tr><td class='tit_toc'><center><img src=images/load-inscr.gif></center></td></tr></table>";
	
	request.send();
}

// VALIDACION DE LA INSCRIPCION
function validarinsc(n,tipo){

	if (tipo != "seminario"){
		if (document.form1.modalidad.value=="D"){
			if ((document.form1.cpAlumno.value=="") || (isNaN(document.form1.cpAlumno.value)) ) {
				document.form1.cpAlumno.style.border = "#FF0000 solid 1px";
				document.form1.cpAlumno.focus();
				cp = false;
			} else {
				document.form1.cpAlumno.style.border = "#DFDCD7 solid 1px";
				cp = true;
			}
			
			if ((document.form1.dirnumAlumno.value=="") || (isNaN(document.form1.dirnumAlumno.value)) ) {
				document.form1.dirnumAlumno.style.border = "#FF0000 solid 1px";
				document.form1.dirnumAlumno.focus();
				num = false;
			}  else {
				document.form1.dirnumAlumno.style.border = "#DFDCD7 solid 1px";
				num = true;
			}
			
			if (document.form1.direAlumno.value=="") {
				document.form1.direAlumno.style.border = "#FF0000 solid 1px";
				document.form1.direAlumno.focus();
				dir = false;
			} else {
				document.form1.direAlumno.style.border = "#DFDCD7 solid 1px";
				dir = true;
			}
	
		}
	}
	
	if (document.form1.numeroDocumento.value=="") {
		document.form1.numeroDocumento.style.border = "#FF0000 solid 1px";
		document.form1.numeroDocumento.focus();
		docum = false;
	} else {
		document.form1.numeroDocumento.style.border = "#DFDCD7 solid 1px";
		docum = true;
	}



	if ((document.form1.telPartAlumno.value=="") && (document.form1.telLaboralAlumno.value=="") && (document.form1.celAlumno.value=="")) {
		//alert("Por favor, ingrese al menos un telefono.");
		document.form1.telPartAlumno.style.border = "#FF0000 solid 1px";
		document.form1.telPartAlumno.focus();
		tel = false;
	}
	else{
		document.form1.telPartAlumno.style.border = "#DFDCD7 solid 1px";
		tel = true;
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form1.mailAlumno.value))){
		//alert("No ingresó su e-Mail o el mismo no es valido.");
		document.form1.mailAlumno.style.border = "#FF0000 solid 1px";		
		document.form1.mailAlumno.focus();
		email = false;
	}
	else{
		document.form1.mailAlumno.style.border = "#DFDCD7 solid 1px";
		email = true;
	}

	if (document.form1.apellidoAlumno.value==""){
		//alert("Por favor, ingrese su apellido.");
		document.form1.apellidoAlumno.style.border = "#FF0000 solid 1px";
		document.form1.apellidoAlumno.focus();
		ape = false;
	}
	else{
		document.form1.apellidoAlumno.style.border = "#DFDCD7 solid 1px";
		ape = true;
	}

	if (document.form1.nombreAlumno.value==""){
		//alert("Por favor, ingrese su nombre.");
		document.form1.nombreAlumno.style.border = "#FF0000 solid 1px";
		document.form1.nombreAlumno.focus();
		nom = false;
	}
	else{
		document.form1.nombreAlumno.style.border = "#DFDCD7 solid 1px";
		nom = true;
	}

	
	if((docum == true) && (tel == true) && (email == true) && (ape == true) && (nom == true) && (dir == true) && (num == true) && (cp == true)){
		return true;
	}
	else{
		alert("Verifique que los campos marcados en rojo sean correctos.");
		return false;
	}
}

// Restauro los bordes de los inputs a su estilo original.
function vaciar()
{
	document.form1.telPartAlumno.style.border = "";
	document.form1.mailAlumno.style.border = "";
	document.form1.apellidoAlumno.style.border = "";
	document.form1.nombreAlumno.style.border = "";
	document.form1.numeroDocumento.style.border = "";
}



function verDatosBancarios(e){
	y = document.body.scrollTop;
	y -= 265;
	x = document.body.scrollLeft;
	x -= 175;
	$('DatosBancarios').style.top = (e.clientY+y)+"px";
	$('DatosBancarios').style.left = (e.clientX+x)+"px";

	$('DatosBancarios').style.visibility = "visible";
}

function divOcultar(a) {
	$(a).style.visibility = "hidden";
}


// ** Help Tips para Tocs ********************************* //
var tipVecID = new Array();
var tipPrefix = 'helpTip';
var TIPwidth = 150;
/*Funcion que obtiene la posicion de la imagen bajo la que se mostrará el TIP*/
function getPosition(o){
	var retval=new Object();
	var param =o;
	retval={top:0,left:0,width:0,height:0};
	retval.left = param.offsetLeft;
	retval.top  = param.offsetTop;
	var parent=param.offsetParent;
	while( parent !=null ){
		retval.left += parent.offsetLeft;
		retval.top += parent.offsetTop;
		parent = parent.offsetParent;
	}
	retval.height = param.height;
	retval.width  = param.width;
	if ((retval.left + 200) > screen.width){
		retval.left = retval.left - 170;
	}
	return retval;
}
/*Función que oculta el TIP*/
function hideTip(obj){
	clearTimeout(tipVecID["show"+tipPrefix+obj.id]);
	if ($(tipPrefix+obj.id)){
		if (navigator.appName == 'Netscape' || navigator.appName == 'Opera'){
			tipVecID[tipPrefix+obj.id]= setTimeout("document.body.removeChild($('"+ tipPrefix + obj.id +"'));",100);
			$(tipPrefix+obj.id).setAttribute("onMouseOver","clearTimeout('"+tipVecID[tipPrefix + obj.id]+"');");
			$(tipPrefix+obj.id).setAttribute("onMouseOut","hideTip($('"+obj.id+"'));");

		}
		else{
			tipVecID[tipPrefix+obj.id]= setTimeout("document.body.removeChild($('"+tipPrefix + obj.id +"'));document.body.removeChild($('IFRAME"+ obj.id +"'));",100);
			$(tipPrefix+obj.id).onmouseover = function(){clearTimeout(tipVecID[tipPrefix+obj.id]);};
			$(tipPrefix+obj.id).onmouseout = function(){hideTip($(obj.id));};
		}
	}
}
/*Función que a partir de un evento oculta el TIP*/
function hideTipEv(e){/*Esta funcion obtiene el elemento a partir del evento y llama a hideTip(obj)*/
	if (window.event) e = window.event;
	var srcEl = e.srcElement? e.srcElement : e.target;
	hideTip(srcEl);
}

function showTip(srcElId){
	srcEl = $(srcElId);
	clearTimeout(tipVecID[srcEl.id]);
	var positions = getPosition(srcEl);
	if (navigator.appName == 'Netscape' || navigator.appName == 'Opera'){
		var tipDiv = document.createElement("DIV");
		tipDiv.setAttribute("STYLE","position:absolute;width:"+TIPwidth+"px; z-index:99;");
		tipDiv.setAttribute("ID",tipPrefix+srcEl.id);
	}
	else{
		var tipDiv = document.createElement("<DIV ID="+tipPrefix+srcEl.id+" STYLE='position:absolute; width:"+TIPwidth+"px; z-index:99;'>");
	}
	document.body.appendChild(tipDiv);
	tipDiv.style.left = positions.left+15;
	tipDiv.style.top = positions.top-15;
	tipDiv.innerHTML = htmlTipStart + tipsLabel[srcEl.id] + htmlTipEnd;
}
/*Funcion que muestra el TIP*/
function showTipEv(e){
	if (window.event) e = window.event;
	var srcEl = e.srcElement? e.srcElement : e.target;
	tipVecID["show" + tipPrefix+srcEl.id] = setTimeout("showTip('"+srcEl.id+"')",75);
}


function StkSeminario(titulo, cod_seminario, fechaSem, seminario){
	
	new StickyWin.Ajax({
		'url'			: "inscripcion-seminario.php?fechaSem="+fechaSem+"&cod_seminario="+cod_seminario+"&titulo="+titulo+"&seminario="+seminario,
		'wrapWithUi'	: true,
		'height'		: "400px",
		'uiOptions'		: {
				'width'			: '580px'
		},		  		
		'draggable'		: true,
		'caption'		: titulo
	}).update();
}