var elArray = new Array(); var elCount = 0; function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&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&&iImage'); myWin.document.write(''); myWin.document.write(''); myWin.document.write(''); myWin.document.write('
  
'); myWin.document.write(''); } function show_photo(strImage){ // Open a window to show the image. var myWin = open("", "win1","dependent=yes,scrollbars=yes,resizable=yes,width=800,height=600"); myWin.focus(); // Write the header info. myWin.document.open(); myWin.document.write('Photo'); myWin.document.write(''); myWin.document.write(''); myWin.document.write(''); myWin.document.write('
  
'); myWin.document.write(''); } function show_flash(strSRC,strWidth,strHeight){ var requiredFlashVersion = 8; var flashVersion = getFlashVersion(); //alert("requiredFlashVersion = " + requiredFlashVersion); //alert("flashVersion = " + flashVersion); if (strWidth == '') { strWidth = ""; } else { strWidth = ' width="' + strWidth + '"'; } if (strHeight == '') { strHeight = ""; } else { strHeight = ' height="' + strHeight + '"'; } if (flashVersion >= requiredFlashVersion) { document.write(''); document.write(''); document.write(''); document.write(''); } else if (flashVersion > 0) { document.write('

In order to view this page you must update the version of flash that you have loaded. To update your flash, click here.

'); } else if (flashVersion == 0) { document.write('

In order to view some items on this site you must have flash installed.

If you are using an iPad, iPod or an iPhone you will need to log on using a laptop or a desktop computer to personalise this item.<\p>

If you are using a desktop or laptop, you need to download flash... click here.

'); } else if (flashVersion == flashVersion_DONTKNOW || flashVersion == null){ document.write('

In order to view some items on this site you must have flash installed.

If you are using an iPad, iPod or an iPhone you will need to log on using a laptop or a desktop computer to personalise this item.<\p>

We cannot tell whether you have flash installed. In order to view some items on this site you must have flash installed. If you cannot view the changing room below, download flash, click here.

'); document.write(''); document.write(''); document.write(''); document.write(''); } } function show_object(strID,strClassID,strSRC,strErrScript){ document.write(''); document.write(strErrScript); document.write(''); } function Restrict_Chars(txtbox,size){ var invalid=false; var count=0; var strExp; var txtExclude=new String('\"\%\&\\;'); var txtComments=new String(txtbox.value); var txtValidText= ''; var b=txtComments.length for (var i=0; i size) { invalidCount=true; } else { txtValidText=txtValidText.concat(a1); } } if (invalidChar == true) { txtbox.value=txtValidText; } else if (invalidCount == true) { alert("The text must not contain more than " + size + " characters."); txtbox.value=txtValidText; } } function Restrict_Numbers(txtbox){ if (txtbox.value == '') { alert("Please enter a number."); txtbox.value = ''; } var invalid=false; var count=0; var strExp; var txtInclude=new String('0123456789'); var txtComments=new String(txtbox.value); var txtValidText= ''; var txtInvalidText= ''; var b=txtComments.length for (var i=0; i intMax) { alert(txtText); txtbox.value = intMax; return false; } else { return true; } } else { return false; } } function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function setCookie(name, value) { var futdate = new Date();//Get the current time and date var expdate = futdate.getTime();//Get the milliseconds since Jan 1, 1970 expdate += 3600000*1000;//expires in 720 hour(milliseconds) futdate.setTime(expdate); var path = ''; var expire = futdate; document.cookie = name + "=" + escape(value) + ((!expire) ? "" : ("; expires=" + expire.toGMTString())) + "; path=" + ((!path) ? "/" : path); } // xGetCookie r1, Copyright 2001-2007 Michael Foster (Cross-Browser.com) // Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL function xGetCookie(name) { var value=null, search=name+"="; if (document.cookie.length > 0) { var offset = document.cookie.indexOf(search); if (offset != -1) { offset += search.length; var end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; value = unescape(document.cookie.substring(offset, end)); } } return value; } // xDeleteCookie r4, Copyright 2001-2007 Michael Foster (Cross-Browser.com) // Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL function xDeleteCookie(name, path) { if (xGetCookie(name)) { document.cookie = name + "=" + "; path=" + ((!path) ? "/" : path) + "; expires=" + new Date(0).toGMTString(); } } function UpdateLanguageCookie(strLangID) { // Get cookie details strMyDomain = '/'; // set expiry date to 1 year from now. var dteLargeExpDate = new Date (); dteLargeExpDate.setTime(dteLargeExpDate.getTime() + (365 * 24 * 3600 * 1000)); SetCookie('LanguageID',strLangID,dteLargeExpDate,strMyDomain); change_language(strLangID); } function GetLanguage() { var strLanguage = GetCookie('LanguageID'); if (strLanguage == null) { return null; } else { change_language(strLanguage); } } function disableEnterKey(e) { var key; if(window.event) key = window.event.keyCode; //IE else key = e.which; //firefox if(key == 13) return false; else return true; } function add_iframe(tmpID,tmpSRC){ if (tmpID == '' || !(elArray[tmpID])) { elArray[elCount] = document.createElement('iframe'); elArray[elCount].setAttribute('id', 'fr' + elCount); document.body.appendChild(elArray[elCount]); elArray[elCount].setAttribute('src', tmpSRC); elArray[elCount].style.width = '0px'; elArray[elCount].style.height = '0px'; elArray[elCount].style.visibility = 'hidden'; elCount ++; } else { elCount = tmpID; elArray[tmpID].setAttribute('src', tmpSRC); } } var tagcloud = { init : function (width,minsize,maxsize,color){ //calculate values and text size var valueRange = $('#TagCloud li').length; var sizeUnit = (maxsize-minsize)/valueRange; $('#TagCloud').css('width',width+'px'); $('#TagCloud li a').css({'color':color}); $('#TagCloud').find('li').each(function(){ var text = $(this).text(); $(this).attr('title',text); var fontsize = $(this).attr('value')*sizeUnit+minsize; $(this).css('font-size',fontsize); }); function randOrder(){ return (Math.floor(Math.random()*valueRange)); } //set li order by value var $lis = $('#TagCloud').children(); if (valueRange > 1) { $lis.hide(); var indices = new Array(); for (i=0;i"); $("#submit-button").hide(); var result = ""; var returnAction = ""; var returnContent = ""; var returnString = ""; var formData = new FormData; formData.append('attFile', attFile); formData.append('qtID', qtID); formData.append('cName', cName ); formData.append('cEmail', cEmail); formData.append('title', title); formData.append('oID', oID); formData.append('msg', msg); $.ajax({ type: 'POST', url: '/cgi-bin/ajax_create_new_ticket.pl?', cache: false, contentType: false,//'multipart/form-data', processData: false, data: formData, error: function (resp){ result = "error"; }, success: function ( resp ) { result = "success"; var resp = $(resp); returnAction = resp.filter('#returnAction').html(); returnContent = resp.filter('#returnContent').html(); }, complete: function( ){ if (returnAction == "success"){ $("article").html(returnContent); $('html, body').animate({scrollTop: $("article").offset().top}, 500); }else if (returnAction == "failure"){ $("#ticket_loader").remove(); $("#submit-button").show(); alert(returnString); }else{ alert("Something has gone wrong. Your request could not be processed."); } } }); } function validateEmail(email) { var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } String.prototype.capitalize = function() { return this.charAt(0).toUpperCase() + this.slice(1); } function swearword_filter(strVariable,txtString){ //swearword_filter("itmOption6", this); var xmlhttp = create_ajax_object(); xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState==4){ if (xmlhttp.responseText == 'FAIL') { txtString.value = ''; update_variable(strVariable,txtString.value); alert('We have spotted and removed a swear word from your name.'); } } } xmlhttp.open('GET', 'https://idir.penwizard.com/cgi-bin/swear_filter.pl?txtString=' + txtString.value, true); xmlhttp.send(null); }