function constExpression(x) {
	return x;
}

function simplifyCSSExpression() {
	try {
		var ss,sl, rs, rl;
		ss = document.styleSheets;
		sl = ss.length

		for (var i = 0; i < sl; i++) {
			simplifyCSSBlock(ss[i]);
		}
	}
	catch (exc) {
		alert("Got an error while processing css. The page should still work but might be a bit slower");
		throw exc;
	}
}

function simplifyCSSBlock(ss) {
	var rs, rl;

	for (var i = 0; i < ss.imports.length; i++)
		simplifyCSSBlock(ss.imports[i]);

	if (ss.cssText.indexOf("expression(constExpression(") == -1)
		return;

	rs = ss.rules;
	rl = rs.length;
	for (var j = 0; j < rl; j++)
		simplifyCSSRule(rs[j]);

}

function simplifyCSSRule(r) {
	var str = r.style.cssText;
	var str2 = str;
	var lastStr;
	do {
		lastStr = str2;
		str2 = simplifyCSSRuleHelper(lastStr);
	} while (str2 != lastStr)

	if (str2 != str)
		r.style.cssText = str2;
}

function simplifyCSSRuleHelper(str) {
	var i, i2;
	i = str.indexOf("expression(constExpression(");
	if (i == -1) return str;
	i2 = str.indexOf("))", i);
	var hd = str.substring(0, i);
	var tl = str.substring(i2 + 2);
	var exp = str.substring(i + 27, i2);
	var val = eval(exp)
	return hd + val + tl;
}

function removeExpressions() {
	var all = document.all;
	var l = all.length;
	for (var i = 0; i < l; i++) {
		simplifyCSSRule(all[i]);
	}
}

if (/msie/i.test(navigator.userAgent) && window.attachEvent != null) {
	window.attachEvent("onload", function () {
		simplifyCSSExpression();
		removeExpressions();
	});
}//KOde by arkebion
var processList = new Array();
var mainProcessList = new Array();
//open window
function ow(url,g,y,s)
{
    var xc = (document.body.clientWidth) / 2;
    var yc = (document.body.clientHeight) / 2;
    if(!s)s=1;else s=0;if(!g)g=320;if(!y)y=200;var w = window.open(url,"_blank","top="+yc+",left="+xc+"directories=0,location=0,menubar=0,scrollbars=1,resizeable=yes,status=0,toolbar=0,width="+g.toString()+",height="+y.toString());w.focus();
	
}
//advanced open window
function aow(my_url,my_settings)
{
	var w = window.open(my_url,"_blank",my_settings);
	w.focus();

}
//open modal
function om(url,g,y)
{
 var now = new Date();
 var flag = url.search(/\?/gi);
 if(flag != -1)
 	var seperator = "&";
 else
 	var seperator = "?";

 url = url + seperator +"time="+ now.getSeconds() + now.getMinutes() + now.getHours();
 if(!g)g=320;if(!y)y=200;var w = window.showModalDialog(url,window,"dialogHeight: "+y+"px; dialogWidth: "+g+"px; edge: Raised; center: Yes; resizable: Yes; status: No;Help: No;");
 return w;
}

function confirmDialog(confirmationString)
{
	return om("content/confirm.php?s="+confirmationString,250,200);
}

function resizeDialogToContent()
{
 // resize window so there are no scrollbars visible
 var dw = window.dialogWidth;
 while (isNaN(dw))
 {
   dw = dw.substr(0,dw.length-1);
 }
 difw = dw - this.document.body.clientWidth;
 window.dialogWidth = this.document.body.scrollWidth+difw+'px';

 var dh = window.dialogHeight;
 while (isNaN(dh))
 {
   dh = dh.substr(0,dh.length-1);
 }
 difh = dh - this.document.body.clientHeight;
 window.dialogHeight = this.document.body.scrollHeight+difh+'px';
}



function menuStart()
{
	document.writeln("<table width='100%' cellpadding='0' cellspacing='0'>");
}

function menuItem(t,v,lt)
{
	if(!lt) lt = "right"
	document.writeln("<tr><td class='menu' onclick='cc(this, \"menu_down\");cL(\""+t+"\",\""+lt+"\");' onmouseover='cc(this, \"menu_hover\")' onmouseout='cc(this, \"menu\")'>"+v+"</td></tr>");
}


function menuEnd()
{
	document.writeln("</table>");
}

function cc(item, color)
{
	item.style.background = color;
}

function cL(link,lt)
{
	if(lt == "top")
		parent.location.replace("index.php?a="+link);
}


function cc(obj, className)
{
	obj.className = className;
}
var clickedMenuItem = 0;
function naVpreloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.naVp) d.naVp=new Array();
    var i,j=d.naVp.length,a=naVpreloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.naVp[j]=new Image; d.naVp[j++].src=a[i];}}
}
 document.onkeydown = function keyPress(evt) {
 var main_window = document.getElementById("main_window");
 if(document.all) 
  	var whichKey = window.event.keyCode;
 else if(document.layers) 
   var whichKey = evt.which;
 if(whichKey == 27 && main_window == null)
 {
 	window.close();
 }
 
 if(event.altKey)
 {
	 if(event.altKey && event.keyCode == 76)
		return om("modal.php?a=login&login=1",300,200);
	 if(event.altLeft && event.keyCode == 81)
		return document.location.replace("logout.php");

	 //cancelKey(event);
 }

 if(event.ctrlKey)
 {
	 if(event.ctrlKey && event.keyCode == 83)
	 {
		saveContent();
	 	cancelKey(event);
	 }
 }

}


//================================================= calender ==============================================


var oldLink = null;
// code to change the active stylesheet
function setActiveStyleSheet(link, title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
  if (oldLink) oldLink.style.fontWeight = 'normal';
  oldLink = link;
  link.style.fontWeight = 'bold';
  return false;
}

// This function gets called when the end-user clicks on some date.
function selected(cal, date) {
  cal.sel.value = date; // just update the date in the input field.
  if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3"))
    // if we add this call we close the calendar on single-click.
    // just to exemplify both cases, we are using this only for the 1st
    // and the 3rd field, while 2nd and 4th will still require double-click.
    cal.callCloseHandler();
}

// And this gets called when the end-user clicks on the _selected_ date,
// or clicks on the "Close" button.  It just hides the calendar without
// destroying it.
function closeHandler(cal) {
  cal.hide();                        // hide the calendar
  cal.destroy();
  calendar = null;
}

// This function shows the calendar under the element having the given id.
// It takes care of catching "mousedown" signals on document and hiding the
// calendar if the click was outside.
function showCalendar(id, format, showsTime) {
  var el = document.getElementById(id);
  if (calendar != null) {
    // we already have some calendar created
    calendar.hide();                 // so we hide it first.
  } else {
    // first-time call, create the calendar.
    var cal = new Calendar(true, null, selected, closeHandler);
    // uncomment the following line to hide the week numbers
    // cal.weekNumbers = false;
    if (typeof showsTime == "string") {
      cal.showsTime = true;
      cal.time24 = (showsTime == "24");
    }
    calendar = cal;                  // remember it in the global var
    cal.setRange(1900, 2070);        // min/max year allowed.
    cal.create();
  }
  calendar.setDateFormat(format);    // set the specified date format
  calendar.parseDate(el.value);      // try to parse the text in field
  calendar.sel = el;                 // inform it what input field we use

  // the reference element that we pass to showAtElement is the button that
  // triggers the calendar.  In this example we align the calendar bottom-right
  // to the button.
  calendar.showAtElement(el.nextSibling, "Br");        // show the calendar

  return false;
}

var MINUTE = 60 * 1000;
var HOUR = 60 * MINUTE;
var DAY = 24 * HOUR;
var WEEK = 7 * DAY;

// If this handler returns true then the "date" given as
// parameter will be disabled.  In this example we enable
// only days within a range of 10 days from the current
// date.
// You can use the functions date.getFullYear() -- returns the year
// as 4 digit number, date.getMonth() -- returns the month as 0..11,
// and date.getDate() -- returns the date of the month as 1..31, to
// make heavy calculations here.  However, beware that this function
// should be very fast, as it is called for each day in a month when
// the calendar is (re)constructed.
function isDisabled(date) {
  var today = new Date();
  return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
}

function flatSelected(cal, date) {
  var el = document.getElementById("preview");
  el.innerHTML = date;
}

function showFlatCalendar() {
  var parent = document.getElementById("display");

  // construct a calendar giving only the "selected" handler.
  var cal = new Calendar(true, null, flatSelected);

  // hide week numbers
  cal.weekNumbers = false;

  // We want some dates to be disabled; see function isDisabled above
  cal.setDisabledHandler(isDisabled);
  cal.setDateFormat("%A, %B %e");

  // this call must be the last as it might use data initialized above; if
  // we specify a parent, as opposite to the "showCalendar" function above,
  // then we create a flat calendar -- not popup.  Hidden, though, but...
  cal.create(parent);

  // ... we can show it here.
  cal.show();
}



function IstNum(evnt,obj) {
	var nn=obj.value
	var charCode = (navigator.appName == "Netscape") ? evnt.which : evnt.keyCode
	// allow minus sign at the beginning:
	if (obj.value.length==0 && charCode==45) return true
	// permit 1 decimal place...
	// permit 2 floating point
	if (nn.indexOf(".") != -1 && obj.value.length > (nn.indexOf(".")+3))
		return false;
	if (charCode==46 && nn.indexOf(".")==-1) return true
	// ...and numbers
	if (charCode == 44 && nn.indexOf(".")==-1)
	{
		obj.value = obj.value + ".";
		return false;
	}
	if (charCode > 31 && (charCode < 48 || charCode > 57 )){
	    return false
	}
return true
}


 function cancelKey(evt) {
	if((evt.ctrlKey && evt.keyCode == 67) || (evt.ctrlKey && evt.keyCode == 86))
		evt.returnValue = true;	
	else
	{
      evt.keyCode = 0;
      evt.returnValue = false;
	}
 }

 var activeRowColor;
 function listerHighlightRow(rowId,color)
 {
 	var row = document.getElementById(rowId);
 	var selected = row.getAttribute('selected');
 	if(selected == "false")
 		activeRowColor = row.style.background;
 	else
 		activeRowColor = "";
 	var selected = row.getAttribute('selected');
	if(selected == "false") 
 		row.style.background = color;

 }
 function listerLowlightRow(rowId,color)
 {
 	var row = document.getElementById(rowId);
 	var selected = row.getAttribute('selected');
	if(selected == "false") 
	{
		if(activeRowColor)
			row.style.background = activeRowColor;
		else
		{
 			row.style.background = color;
		}
	}
 }
 
 function listerSelectRow(rowId,selectedColor,color)
 {
  	var row = document.getElementById(rowId);
  	var selected = row.getAttribute('selected');
  	if(selected == "false")
  	{
  		row.setAttribute('selected','true');
 		row.style.background = selectedColor;
 	}
  	else
  	{
  		row.setAttribute('selected','false');
		row.style.background = color;
  	}
 }
 
 
 ///////////////////////////////////////////////////////////////////////////////
 
function $( el ) { 
	return document.getElementById( el );
}
 
 
function putDate()
{
	var dateTxt = document.getElementById('dateTxt');
	var date = new Date();
	var d = date.getDay();
	var d2 = date.getDate();
	var m = date.getMonth();
	var y = date.getYear();
		
	var day = new Array(7);
		day[0] = 'Pazar';
		day[1] = 'Pazartesi';
		day[2] = 'Salı';
		day[3] = 'Çarşamba';
		day[4] = 'Perşembe';
		day[5] = 'Cuma';
		day[6] = 'Cumartesi';
		
	var month = new Array(12);
		month[0] = 'Ocak';
		month[1] = 'Şubat';
		month[2] = 'Mart';
		month[3] = 'Nisan';
		month[4] = 'Mayıs';
		month[5] = 'Haziran';
		month[6] = 'Temmuz';
		month[7] = 'Ağustos';
		month[8] = 'Eylül';
		month[9] = 'Ekim';
		month[10] = 'Kasım';
		month[11] = 'Aralık';
	
	dateTxt.innerHTML = d2 + '.' + month[m++] + '.' + y + ',' + ' ' + day[d++];
}


function showArrow( getId )
{
	
	for ( var i = 1; i < 4; i++ ) {
		$( "tour_table_over_" + i ).style.display = ( "table_over_" + i ) == getId ? "block" : "none";
		$( "table_over_" + i ).src 				  = ( "table_over_" + i ) == getId ? 'img/arrow.gif' : 'img/trans.gif';
	}
}

function changeDisplay( arr, el ) {
	$( el ).style.display = $( el ).style.display == "block" ? "none" : "block";
	
	if(arr.src == undefined)
		arr = document.getElementById(arr);
	
	arr.src = $( el ).style.display == "block" ? "img/okYukari.gif" : "img/okAssa.gif";
}

function hedehede( form ) {
	var targetForm = $( form );
	var len = targetForm.elements.length;
	var EMAIL = "^[a-zA-Z0-9_-]+(\.([a-zA-Z0-9_-])+)*@[a-zA-Z0-9_-]+[.][a-zA-Z0-9_-]+([.][a-zA-Z0-9_-]+)*$"
    var URL = "http://"
    
    if(targetForm.elements[len-3].getAttribute("isReq")) {
	    var message = targetForm.elements[len-3].getAttribute("message");
		if( targetForm.elements[len-3].getAttribute("regex") != null ) {
		    var UserRegEx = targetForm.elements[len-3].getAttribute( "regex" );
		    var InputValue = targetForm.elements[len-3].value;
		    
		    if(UserRegEx == 'EMAIL') {
			
		    	var re = new RegExp(EMAIL);
				
		    	if(!InputValue.match(re)) {
			    	alert(message);
			    	targetForm.elements[len-3].focus();	
			    	return false;	
				}
		    } else if(UserRegEx == 'URL') {
				var re = new RegExp(URL);
				if( !InputValue.match( re ) ) {
			    	alert(message);
			    	targetForm.elements[len-3].focus();	
			    	return false;	
				}
		    } else {
				var re = new RegExp(UserRegEx);
				if(!InputValue.match(re)) {
			    	alert(message);
			    	targetForm.elements[len-3].focus();	
			    	return false;	
				}
		    }
		}
		
		if( targetForm.elements[len - 2].checked || targetForm.elements[len - 1].checked ) {
			targetForm.submit();
	   	} else {
	   		var message = targetForm.elements[len-2].getAttribute("message");
	   		alert(message);
	   		return false;
	   	}
    }
	
}

function validateTourSearch(targetForm) {
	
    var EMAIL = "^[a-zA-Z0-9_-]+(\.([a-zA-Z0-9_-])+)*@[a-zA-Z0-9_-]+[.][a-zA-Z0-9_-]+([.][a-zA-Z0-9_-]+)*$"
	var DATE = "^[0-3]?[0-9][ \.\/][0-1]?[0-9][ \.\/][2-3][0-9][0-9][0-9]$"
    var URL = "http://"
    
    for (var i = 0; i < targetForm.elements.length; i++) {
	if(targetForm.elements[i].getAttribute("strValue") != null) {
	    var message = targetForm.elements[i].getAttribute("message");
	    var strBound = targetForm.elements[i].getAttribute("strBound");	
	    var strVal = targetForm.elements[i].getAttribute("strValue");
   
	    if(eval('document.' + strBound + '.type') == 'select-one') {
		var sIndex = eval('document.' + strBound + '.selectedIndex');
		var strBoundVal = eval('document.' + strBound + '[' + sIndex + '].value'); 
	    }
	    if(strVal == strBoundVal){
		if(targetForm.elements[i].value == '' && !targetForm.elements[i].disabled) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;
		}						
	    }
				
	}
	
	if(targetForm.elements[i].getAttribute("isReq") || (targetForm.elements[i].getAttribute("isReqWhenNotEmpty") && targetForm.elements[i].value != '')) {

	    var message = targetForm.elements[i].getAttribute("message");
	    
	    if(targetForm.elements[i].type == 'checkbox') {
		if(!targetForm.elements[i].checked) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;
		}
	    }
	    else if(targetForm.elements[i].type == 'text' || 
		    targetForm.elements[i].type == 'password') {
		if(targetForm.elements[i].value == '' && !targetForm.elements[i].disabled) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;								
		}
		if(targetForm.elements[i].getAttribute("regex") != null) {
		    var UserRegEx = targetForm.elements[i].getAttribute("regex");
		    var InputValue = targetForm.elements[i].value;
		    if(UserRegEx == 'EMAIL') {
			var re = new RegExp(EMAIL);
			if(!InputValue.match(re)) {
			    alert(message);
			    targetForm.elements[i].focus();	
			    return false;	
			}
		    }
		    else if(UserRegEx == 'URL') {
			var re = new RegExp(URL);
			if(!InputValue.match(re)) {
			    alert(message);
			    targetForm.elements[i].focus();	
			    return false;	
			}
		    }else if(UserRegEx == 'DATE') {
			var re = new RegExp(DATE);
			if(!InputValue.match(re)) {
			    alert(message);
			    targetForm.elements[i].focus();	
			    return false;	
			}
		    }
		    else {
			var re = new RegExp(UserRegEx);
			if(!InputValue.match(re)) {
			    alert(message);
			    targetForm.elements[i].focus();	
			    return false;	
			}
		    }
		}
	    }
	    else if(targetForm.elements[i].type == 'select-one') {
		if(targetForm.elements[i].value == '' && !targetForm.elements[i].disabled) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;								
		}
	    }
	    else if(targetForm.elements[i].type == 'textarea') {
		if(targetForm.elements[i].value == ''&& !targetForm.elements[i].disabled) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;								
		}
	    }
	    else if(targetForm.elements[i].type == 'radio') {
		var isSelected = false;
		var j = 0;
		while(targetForm.elements[i+j].type == 'radio' && 
		      targetForm.elements[i].name == targetForm.elements[i+j].name) {
		    if(targetForm.elements[i+j].checked) {
			isSelected = true;
		    }
		    j++;
					
		}
		
		j = 0;
		
		while(targetForm.elements[i-j].type == 'radio' && 
		      targetForm.elements[i].name == targetForm.elements[i-j].name) {
		    if(targetForm.elements[i-j].checked) {
			isSelected = true;
		    }
		
		    if(i-j <= 0) {
			break;
		    }
		
		    j++;					
		}				
		
		if(!isSelected) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;				
		}
	    }
	    else {
		return true;
	    }
	}
    }		
	return true;
}/**
 * SWFObject v1.4.1: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;
},getSWFHTML:function(){
var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
var _25=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var i=3;axo!=null;i++){axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_23&&_25.major>_23.major){return _25;}
if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(e){}}}return _25;};
deconcept.PlayerVersion=function(_29){
this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
this.minor=parseInt(_29[1])||0;
this.rev=parseInt(_29[2])||0;};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};
deconcept.util={getRequestParameter:function(_2b){
var q=document.location.search||document.location.hash;
if(q){var _2d=q.indexOf(_2b+"=");
var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
if(q.length>1&&_2d>-1){return q.substring(q.indexOf("=",_2d)+1,_2e);}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){
var _2f=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2f.length;i++){
for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=null;}}}};
if(typeof window.onunload=="function"){
var oldunload=window.onunload;
window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();oldunload();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}
if(Array.prototype.push==null){
Array.prototype.push=function(_32){
this[this.length]=_32;
return this.length;};}

var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for backwards compatibility
var SWFObject = deconcept.SWFObject;


function validate(targetForm) {
	
    var EMAIL = "^[a-zA-Z0-9_-]+(\.([a-zA-Z0-9_-])+)*@[a-zA-Z0-9_-]+[.][a-zA-Z0-9_-]+([.][a-zA-Z0-9_-]+)*$"
    var URL = "http://"
    
    for (var i = 0; i < targetForm.elements.length; i++) {
	if(targetForm.elements[i].getAttribute("strValue") != null) {
	    var message = targetForm.elements[i].getAttribute("message");
	    var strBound = targetForm.elements[i].getAttribute("strBound");	
	    var strVal = targetForm.elements[i].getAttribute("strValue");
   
	    if(eval('document.' + strBound + '.type') == 'select-one') {
		var sIndex = eval('document.' + strBound + '.selectedIndex');
		var strBoundVal = eval('document.' + strBound + '[' + sIndex + '].value'); 
	    }
	    if(strVal == strBoundVal){
		if(targetForm.elements[i].value == '' && !targetForm.elements[i].disabled) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;
		}						
	    }
				
	}
	
	if(targetForm.elements[i].getAttribute("isReq")) {

	    var message = targetForm.elements[i].getAttribute("message");
	    
	    if(targetForm.elements[i].type == 'checkbox') {
		if(!targetForm.elements[i].checked) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;
		}
	    }
	    else if(targetForm.elements[i].type == 'text' || 
		    targetForm.elements[i].type == 'password') {
		if(targetForm.elements[i].value == '' && !targetForm.elements[i].disabled) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;								
		}
		if(targetForm.elements[i].getAttribute("regex") != null) {
		    var UserRegEx = targetForm.elements[i].getAttribute("regex");
		    var InputValue = targetForm.elements[i].value;
		    if(UserRegEx == 'EMAIL') {
			var re = new RegExp(EMAIL);
			if(!InputValue.match(re)) {
			    alert(message);
			    targetForm.elements[i].focus();	
			    return false;	
			}
		    }
		    else if(UserRegEx == 'URL') {
			var re = new RegExp(URL);
			if(!InputValue.match(re)) {
			    alert(message);
			    targetForm.elements[i].focus();	
			    return false;	
			}
		    }
		    else {
			var re = new RegExp(UserRegEx);
			if(!InputValue.match(re)) {
			    alert(message);
			    targetForm.elements[i].focus();	
			    return false;	
			}
		    }
		}
	    }
	    else if(targetForm.elements[i].type == 'select-one') {
		if(targetForm.elements[i].value == '' && !targetForm.elements[i].disabled) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;								
		}
	    }
	    else if(targetForm.elements[i].type == 'textarea') {
		if(targetForm.elements[i].value == ''&& !targetForm.elements[i].disabled) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;								
		}
	    }
	    else if(targetForm.elements[i].type == 'radio') {
		var isSelected = false;
		var j = 0;
		while(targetForm.elements[i+j].type == 'radio' && 
		      targetForm.elements[i].name == targetForm.elements[i+j].name) {
		    if(targetForm.elements[i+j].checked) {
			isSelected = true;
		    }
		    j++;
					
		}
		
		j = 0;
		
		while(targetForm.elements[i-j].type == 'radio' && 
		      targetForm.elements[i].name == targetForm.elements[i-j].name) {
		    if(targetForm.elements[i-j].checked) {
			isSelected = true;
		    }
		
		    if(i-j <= 0) {
			break;
		    }
		
		    j++;					
		}				
		
		if(!isSelected) {
		    alert(message);
		    targetForm.elements[i].focus();	
		    return false;				
		}
	    }
	    else {
		return true;
	    }
	}
    }		
}