// JavaScript Document
// SoftwareKey.com
function lnkExternalLaunch(href){var newWin=window.open(href,'newwin');newWin.focus();}
function toggle(inp,obj){inp=document.getElementById(inp);obj=document.getElementById(obj);if(inp.nodeName=='INPUT'){if(inp.checked){obj.style.display='block';}else{obj.style.display='none';}}else{if(inp.value=='Other'){obj.style.display='block';}else{obj.style.display='none';}}}
google.load('jquery','1.3.1');google.setOnLoadCallback(function(){$('p.tight').css('display','none');$('a[rel="external"],a[rel="document"]').each(function(){this.onclick=function(){lnkExternalLaunch(this.href);return false;}});$('#search').val('Search...').focus(function(){if('Search...'==this.value){this.value='';$(this).removeClass('prefill');}}).blur(function(){if(''==this.value){this.value='Search...';$(this).addClass('prefill');}});$('#frmMailList').submit(function(){var err=false;var obj=document.getElementById('cm-224893-224893');if(obj.value.length==0){err=true;$('#cm-224893-224893 + .txtError').html('Please enter your email address.');}else{var re=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;if(!(re.test(obj.value))){err=true;$('#cm-224893-224893 + .txtError').html('Please enter a valid email address.');}else{$('#cm-224893-224893 + .txtError').html('');}}
if(err){return false;}});$('#frmTrialPP').submit(function(){var err=false;if(!$('#title').val()){err=true;$('#title + .txtError').html('Please select your title.');}else{$('#title + .txtError').html('');}
if(!$('#first_name').val()){err=true;$('#first_name + .txtError').html('Please enter your first name.');}else{$('#first_name + .txtError').html('');}
if(!$('#last_name').val()){err=true;$('#last_name + .txtError').html('Please enter your last name.');}else{$('#last_name + .txtError').html('');}
if(!$('#Misc6').val()){err=true;$('#Misc6 + .txtError').html('Please enter your occupation.');}else{$('#Misc6 + .txtError').html('');}
if(!$('#e_mail').val()){err=true;$('#e_mail + .txtError').html('Please enter your email address.');}else{var re=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;if(!(re.test($('#e_mail').val()))){err=true;$('#e_mail + .txtError').html('Please enter a valid email address.');}else{$('#e_mail + .txtError').html('');}}
if(!$('#Voice').val()){err=true;$('#Voice + .txtError').html('Please enter your phone number.');}else{var phone=$('#Voice').val();phone=phone.replace(/[\(\)\.\-\ ]/g,'');if(isNaN(parseInt(phone))){err=true;$('#Voice + .txtError').html('Please enter a valid phone number.');}else{$('#Voice + .txtError').html('');}}
if(!$('#source').val()){err=true;$('#source + .txtError').html('Please select how you heard about us.');}else{$('#source + .txtError').html('');if($('#source').val()=='Other'&&!($('#sourceother').val())){err=true;$('#sourceother + .txtError').html('Please specify how you heard about us.');}else{$('#sourceother + .txtError').html('');}}
var temp=false;$.each($('#langOpts input'),function(){if(this.checked){temp=true;}});if(temp==false){err=true;$('#langOpts .txtError').html('Please choose at least one language.');}else{$('#langOpts .txtError').html('');}
if(document.getElementById('Other').checked&&!($('#Misc1Other').val())){err=true;$('#Misc1Other + .txtError').html('Please specify the language and compiler.');}else{$('#Misc1Other + .txtError').html('');}
var temp=false;$.each($('#libOpts input'),function(){if(this.checked){temp=true;}});if(temp==false){err=true;$('#libOpts .txtError').html('Please choose at least one library type.');}else{$('#libOpts .txtError').html('');}
var temp=false;$.each($('#platformOpts input'),function(){if(this.checked){temp=true;}});if(temp==false){err=true;$('#platformOpts .txtError').html('Please choose at least one platform.');}else{$('#platformOpts .txtError').html('');}
if(!$('#Misc4').val()){err=true;$('#Misc4 + .txtError').html('Please select your application type.');}else{$('#Misc4 + .txtError').html('');if($('#Misc4').val()=='Other'&&!($('#Misc4Other').val())){err=true;$('#Misc4Other + .txtError').html('Please specify your application type.');}else{$('#Misc4Other + .txtError').html('');}}
if(!$('#Misc5').val()){err=true;$('#Misc5 + .txtError').html('Please select your timetable to purchase.');}else{$('#Misc5 + .txtError').html('');}
if(err){var obj = $('#errMsg').show();document.getElementById('errMsg');var targetOffset=$(obj).offset().top;$('html,body').animate({scrollTop:targetOffset},500);return false;}});$('#frmContact').submit(function(){var err=false;if(!$('#contact_to').val()){err=true;$('#contact_to + .txtError').html('Please select who you would like to contact.');}else{$('#contact_to + .txtError').html('');}
if(!$('#contact_subject').val()){err=true;$('#contact_subject + .txtError').html('Please select a subject.');}else{$('#contact_subject + .txtError').html('');}
if(!$('#contact_name').val()){err=true;$('#contact_name + .txtError').html('Please enter your name.');}else{$('#contact_name + .txtError').html('');}
if(!$('#contact_email').val()){err=true;$('#contact_email + .txtError').html('Please enter your email address.');}else{var re=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;if(!(re.test($('#contact_email').val()))){err=true;$('#contact_email + .txtError').html('Please enter a valid email address.');}else{$('#contact_email + .txtError').html('');}}
if($('#contact_phone').val()){var phone=$('#contact_phone').val();phone=phone.replace(/[\(\)\.\-\ ]/g,'');if(isNaN(parseInt(phone))){$('#contact_phone + .txtError').html('Please enter a valid phone number.');}else{$('#contact_phone + .txtError').html('');}}
if(!$('#contact_msg').val()){err=true;$('#contact_msg + .txtError').html('Please enter a message.');}else{$('#contact_msg + .txtError').html('');}
if(err){return false;}});});var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();
if(!(BrowserDetect.browser=='Explorer'&&BrowserDetect.version<7)){
var myriad={src:'/client/myriad.swf'};
if (eval('(typeof(sIFR) != "undefined")')) { sIFR.activate(myriad);sIFR.replace(myriad,{selector:'h1',css:'.sIFR-root { color: #ffffff; }',filters:{DropShadow:{distance:1,color:'#000000',strength:2,alpha:.5}},wmode:'transparent'});sIFR.replace(myriad,{selector:'h1.hero',css:'.sIFR-root { color: #ffffff; }',filters:{DropShadow:{distance:1,color:'#000000',strength:2,alpha:.5}},wmode:'transparent'});sIFR.replace(myriad,{selector:'h2',css:'.sIFR-root { background-color: #fff; color: #0D78A4; }',wmode:'transparent'});sIFR.replace(myriad,{selector:'h3',css:'.sIFR-root { color: #ffffff; }',wmode:'transparent'});sIFR.replace(myriad,{selector:'h4',css:'.sIFR-root { background-color: #fff; color: #1f1f1f; }',wmode:'transparent'});} }