function AC_FL_PreloadContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");return AC_GenerateText(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GenerateText(objAttrs,params,embedAttrs)
{var str='<object ';for(var i in objAttrs)
str+=i+'="'+objAttrs[i]+'" ';str+='>';for(var i in params)
str+='<param name="'+i+'" value="'+params[i]+'" /> ';str+='<embed ';for(var i in embedAttrs)
str+=i+'="'+embedAttrs[i]+'" ';str+=' ></embed></object>';return str;}
function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_Generateobj(objAttrs,params,embedAttrs)
{var str='<object ';for(var i in objAttrs)
str+=i+'="'+objAttrs[i]+'" ';str+='>';for(var i in params)
str+='<param name="'+i+'" value="'+params[i]+'" /> ';str+='<embed ';for(var i in embedAttrs)
str+=i+'="'+embedAttrs[i]+'" ';str+=' ></embed></object>';document.write(str);}
function AC_FL_RunContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_SW_RunContent(){var ret=AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"id":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret;};var fieldvalue={"search":"Product Search","work_phone":"555-555-5555","zip":"#####","email":"emailaddress@domain.com"};var addthis_config={services_exclude:'print,email'}
var addthis_disable_flash=true;var dbody=$(document.body);var address_id='default';var address_list={"default":"205 House Avenue, Camp Hill, PA 17011","harrisburg":"205 House Avenue, Camp Hill, PA 17011","pittsburgh":"738 Ohio River Blvd.  Pittsburgh PA 15202","philladelphia":"P.O. Box 18160  Philadelphia PA 19116","berkscounty":"147 Austrian Drive  Blandon PA 19510","nnj":"4 Great Meadow Lane Suite 4B East Hanover NJ 07936","whiteplains":"39 Westmoreland Avenue  White Plains NY 10606","manhattan":"250 W 57th Street Suite 1316 New York NY 10107","wilmington":"35 Salem Church Road Suite 10 Newark DE 19713","stamford":"25 Van Zant Street Suite 1B-4 Norwalk CT 06855","hartford":"281 Hartford Turnpike Suite G4 Vernon CT 06066","columbus":"7 Rosebraugh Cir Suite 500 Buckeye Lake OH 43008","cleveland":"P.O. Box 39218  North Ridgeville OH 44039","triad":"3900 C Battleground Avenue #132 Greensboro NC 27410","southflorida":"1599 S. W. 30th Avenue Suite 7 Boynton Beach FL 33426","stlouis":"2319 Woodson Road  Overland MO 63114","boulder":"3879 E. 120th Avenue Suite 332  Thornton CO 80233","boise":"107 E. 46th Street Suite 112 Garden City ID 83714","lasvegas":"3111 S. Valley View Blvd. Suite A-121  Las Vegas NV 89102","burlington":"3526 Mainway Drive   Burlington ON L7M 1A8","brampton":"3226 Owlridge Drive    Oakville ON L6M 3H4","edmonton":"2057-111th Street Suite #711 Edmonton AB T6J 4V9","winnipeg":"104-1200 Pembina Highway  Winnipeg MB R3T 2A7"}
function display_login(login_status)
{var ni=document.getElementById('loginBox');var newanchor=document.createElement('a');if(login_status)
ni.innerHTML="<a href='cart/my-account.php?Logout=Go&ContinueURL=/index.html' title='Login' style='color:#ffffff;text-decoration:none'>Logout</a>";else
ni.innerHTML="<a href='cart/my-account.php?ContinueURL=/index.html' title='Login' style='color:#ffffff;text-decoration:none'>Login</a>";}
function loadCatAjax(cat,div,page)
{new Ajax.Request('/category-ajax.php',{method:'post',parameters:{cmd:'category',id:cat,product:page,cont:div},onSuccess:function(transport)
{$(div+'_update').innerHTML=transport.responseText;},onFailure:function(transport)
{if(404==transport.status)
{$(div).innerHTML='Nothing Available';}}});new Ajax.Request('/category-ajax.php',{method:'post',parameters:{cmd:'pagination',id:cat,product:page,cont:div},onSuccess:function(transport)
{$(div+'_header_pagination').innerHTML=transport.responseText;},onFailure:function(transport)
{if(404==transport.status)
{$(div).innerHTML='Nothing Available';}}});}
function openVideoDiv(){if($('header_display'))
{Cookie.init({expires:15,name:'omex_video',path:'/',refresh_cookie:false});if(Cookie.getData("play_flash")!=undefined)
var playback="?pause_vid="+Cookie.getData("play_flash");else
var playback="";$('header_display').innerHTML=AC_FL_PreloadContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','641','height','239','movie','flash/omex'+playback,'quality','high','allowfullscreen','false','wmode','transparent');Cookie.setData("play_flash","pause")}
if($('header_display_franchise'))
{Cookie.init({expires:15,name:'omex_video',path:'/',refresh_cookie:false});if(Cookie.getData("play_flash_franchise")!=undefined)
var playback="?pause_vid="+Cookie.getData("play_flash_franchise");else
var playback="";$('header_display_franchise').innerHTML=AC_FL_PreloadContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','641','height','239','movie','flash/omex-franchise'+playback,'quality','high','allowfullscreen','false','wmode','transparent');Cookie.setData("play_flash_franchise","pause")}}
function bookmarksite(title,url)
{if(document.all)window.external.AddFavorite(url,title);else if(window.sidebar)window.sidebar.addPanel(title,url,"");}
function get_document_window_height()
{if(document.body&&document.body.clientHeight&&(document.body.clientHeight>1))return document.body.clientHeight;else if(window&&window.innerHeight)return window.innerHeight;else if(document.documentElement&&document.documentElement.offsetHeight)
return document.documentElement.offsetHeight;else if(document.body&&document.body.offsetHeight)
return document.body.offsetHeight;return 0;}
function get_document_window_width()
{if(document.body&&document.body.clientWidth)
return document.body.clientWidth;else if(window&&window.innerWidth)return window.innerWidth;else if(document.documentElement&&document.documentElement.offsetWidth)
return document.documentElement.offsetWidth;else if(document.body&&document.body.offsetWidth)
return document.body.offsetWidth;return 0;}
function convert_width(width,window_width)
{if(width==null)width=page_width+52;else if(typeof(width)=='string'){var percent_pos=width.indexOf('%');if(percent_pos!=-1)
width=window_width*(width.substr(0,percent_pos)/100);}
if(!document.all){if(width>(window_width-25))width=window_width-25;}
else if(width>(window_width-10))width=window_width-10;return width;}
function convert_height(height,window_height)
{if(height==null)height=window_height;else if(typeof(height)=='string'){var percent_pos=height.indexOf('%');if(percent_pos!=-1)
height=window_height*(height.substr(0,percent_pos)/100);}
if(height>(window_height-40))height=window_height-40;return height;}
function calculate_left(width,window_width)
{var left=(window_width-width)/2;if(!document.all)left+=10;if(left<0)left=0;return left;}
function calculate_top(height,window_height)
{var top=((window_height-height)/2)-3;if(top<0)top=0;return top;}
function goto_url(val)
{if(val!="")
location.href=val;}
function removeHTMLTags(htmlString){if(htmlString){var mydiv=document.createElement("div");mydiv.innerHTML=htmlString;if(document.all)
{return mydiv.innerText;}
else
{return mydiv.textContent;}}}
var address;function get_address()
{if(Cookie.getData("cururl")!=undefined)
{address_id=Cookie.getData("cururl");}
address=address_list[address_id];}
window.onunload=function(){if($('map'))
{GUnload()}};function get_iframe(id)
{var iframe=document.frames?document.frames[id]:document.getElementById(id);var ifWin=iframe.contentWindow||iframe;return ifWin;}
function print_iframe(id)
{var ifWin=get_iframe(id);ifWin.focus()
ifWin.print();return false;}
window.onload=function(){openVideoDiv();if(show_thankyou)
display_form_thank_you('<h1 style="text-align: center;"><em><span style="font-family: Times New Roman;">Thank You</span></em></h1><p style="text-align: center;">Thank you for your interest in OMEX&reg;. <br>Your&nbsp;request has been submitted.</p><p style="text-align: center;"><img width="225" height="145" alt="" src="/images/Omex-Corp.jpg"></p>')
Cookie.init({name:'omex_local',path:'/'});if($('map')&&Cookie.getData("cururl")!=undefined)
{if($('directions'))
{gmLocator.loader.initialize();gmLocator.options.map_draggable=true;gmLocator.options.largemapcontrol3d=true;gmLocator.options.maptypecontrol=true;gmLocator.options.marker_clickable=false;get_address();cont_size=new GSize(730,500);gmLocator.map.setup('map',cont_size);gmLocator.directions.directions_panel=$('directions');gmLocator.populate();if($('stadd'))
{gmLocator.directions.addresses=[$('stadd').value,address];gmLocator.directions.make_path();gmLocator.directions.create();gmLocator.directions.load_directions();}}
else
{gmLocator.loader.initialize();gmLocator.directions.initialize();gmLocator.options.marker_clickable=true;get_address();gmLocator.map.setup('map');gmLocator.vars.zoom=11;gmLocator.populate();divDialogs.create_dialog('draggable','gdirectionsContainer','gdHeader',null);}}};var validChars={"numeric":"0123456789","phone":"0123456789-","email":"emailaddress@domain.com"};function onlyint(e,field)
{if(window.event)keynum=e.keyCode;else if(e.which)keynum=e.which;if(keynum=="0x0b")return true;if(keynum=="0x08")return true;if(keynum=="0x09")return true;if(keynum=="0x20")return true;if(keynum=="0x2d"&&field=='phone')return true;if(keynum=="0x28"&&field=='phone')return true;if(keynum=="0x29"&&field=='phone')return true;if(keynum=="0x2E"&&field=='currency')return true;if(keynum=="0x2F"&&field=='date')return true;if((keynum>="0x30")&&(keynum<="0x39"))return true;return false;}
function onlyAlphaNumeric(e)
{if(window.event)keynum=e.keyCode;else if(e.which)keynum=e.which;if(keynum=="0x08")return true;if(keynum=="0x09")return true;if(keynum=="0x20")return true;if((keynum>="0x30")&&(keynum<="0x39"))return true;if((keynum>="0x41")&&(keynum<="0x5A"))return true;if((keynum>="0x61")&&(keynum<="0x7A"))return true;return false;}
function onlyAlpha(e)
{if(window.event)keynum=e.keyCode;else if(e.which)keynum=e.which;if(keynum=="0x08")return true;if(keynum=="0x09")return true;if(keynum=="0x20")return true;if((keynum>="0x41")&&(keynum<="0x5A"))return true;if((keynum>="0x61")&&(keynum<="0x7A"))return true;return false;}
function autotab(current,to){if(current.getAttribute&&current.value.length==current.getAttribute("maxlength")){to.focus()}}
function enable_field(element){element=$(element);element.show();element.down('.input').disabled=false;element.down('.input').style.backgroundColor="#ffffff";}
function disable_field(element){element=$(element);element.hide();element.down('.input').disabled=true;element.down('.input').style.backgroundColor="#efefef";}
function swapState(val)
{if(val!=1)
{var input_width=Math.floor(219*.58);$('state_div').hide();$('state').disabled=true;$('city').style.width=input_width+"px";$('province').style.width=input_width+"px";$('province_div').show();$('province').disabled=false;$('mail_label').update("Postal");$('zip').disabled=true;$('postal').disabled=false;$('zip').hide();$('postal').show();}
else
{$('state_div').show();$('state').disabled=false;$('city').style.width="211px";$('province_div').hide();$('province').disabled=true;$('mail_label').update("Zip");$('zip').disabled=false;$('postal').disabled=true;$('zip').show();$('postal').hide();}}
specialties=["individual_physicians","medical_groups","urgent_care_centers","hospitals","medical_spas","skilled_nursing_facilites","home_healthcare_agencies","hospice_care","teleradiology","hmo_reinsurance"];function changeSpecialty(val)
{index=val.toLowerCase();index=index.replace(/\ /gi,'_');for(i=0;i<specialties.length;i++)
$(specialties[i]+"_div").hide();$(index+"_div").show();}
function echeck(str)
{var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if(str.indexOf(at)==-1){return false}
if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){return false}
if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){return false}
if(str.indexOf(at,(lat+1))!=-1){return false}
if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){return false}
if(str.indexOf(dot,(lat+2))==-1){return false}
if(str.indexOf(" ")!=-1){return false}
return true}
function clearField(element)
{if(fieldvalue[element.name])
if(fieldvalue[element.name]==element.value){element.value="";element.style.color="#2c72a8";element.style.padding="1px";element.style.width="150px";}
else if(element.value==""){element.value=fieldvalue[element.name];element.style.color="#cccccc";element.style.padding="1px 3px";element.style.width=(element.getWidth()-12)+"px";}}
function checkPhone(element,doalert)
{var vallen=$F(element).length;var IsNumber=true;var inpt=$F(element);var Char;var number;if(inpt!=''&&inpt!=null&&fieldvalue[element.name]!=inpt)
{inpt=inpt.replace(/[^0-9]/g,"");if(vallen>9)
{for(i=0;i<vallen&&IsNumber==true;i++)
{Char=inpt.charAt(i);if(validChars['numeric'].indexOf(Char)==-1)
{IsNumber=false;}}
if(!IsNumber)
{element.addClassName('errorinput');if(!doalert)
alert("A phone number contains only numbers.")
return false;}
else
{element.removeClassName('errorinput');return true;}}
else
{element.addClassName('errorinput');if(!doalert)
alert("A phone number is at least 10 characters long.")
return false;}}
else
{element.addClassName('errorinput');if(!doalert)
alert("Please enter a phone number.")
return false;}
element.removeClassName('errorinput');return true;}
function checkZip(element,doalert)
{var ziplen=$F(element).length;var IsNumber=true;var inpt=$F(element);var Char;var number;if(inpt!=''||inpt!=null||fieldvalue[element.name]!=inpt)
{if(ziplen>=5)
{for(i=0;i<ziplen&&IsNumber==true;i++)
{Char=inpt.charAt(i);if(validChars['numeric'].indexOf(Char)==-1)
{IsNumber=false;}}
if(!IsNumber)
{element.addClassName('errorinput');if(!doalert)
alert("A zip code contains only numbers.")
return false;}
else
{element.removeClassName('errorinput');return true;}}
else
{element.addClassName('errorinput');if(!doalert)
alert("A zip code is normally 5 characters long.")
return false;}}
else
{element.addClassName('errorinput');if(!doalert)
alert("Please enter a zip code.")
return false;}
element.removeClassName('errorinput');return true;}
function prep_form(){fields=Object.keys(fieldvalue);fields.each(function(m)
{if($(m))
if($(m).value==""||$(m).value==fieldvalue[m])
{$(m).style.color="#cccccc";$(m).style.padding="1px 3px";$(m).style.width=($(m).getWidth()-12)+"px";$(m).value=fieldvalue[m];}})}
function checkEmail(element,doalert)
{inpt=$F(element);if((inpt==null)||(inpt=="")||fieldvalue[element.name]==inpt){element.addClassName('errorinput');if(!doalert)
alert("Please enter your email address.")
return false;}
if(echeck(inpt)==false){element.addClassName('errorinput');if(!doalert)
alert("Please enter make sure your email address is in this format: "+validChars['email'])
return false;}
element.removeClassName('errorinput');return true;}
function checkInput(element,doalert)
{inpt=$F(element);if((inpt==null)||(inpt=="")){element.addClassName('errorinput');if(!doalert)
alert("Please enter a value.")
return false;}
element.removeClassName('errorinput');return true;}
function validate_form(form)
{elements=Form.getElements(form);error_arr=new Array();elements.each(function(m)
{if(m.type=="text")
{if(m.id=="email")
{if(!checkEmail(m,true))
error_arr.push(false);}
else if(m.id=="work_phone")
{if(!checkPhone(m,true))
error_arr.push(false);}
else if(m.id=="zip")
{if(!checkZip(m,true))
error_arr.push(false);}
else
{if(!checkInput(m,true))
error_arr.push(false);}}
if(m.type=="select-one"&&m.id!="type")
{if(!checkInput(m,true))
error_arr.push(false);}});if(error_arr.length>0)
{alert("Please make sure you have the correct information in all highlighted fields.");return false;}
else
{return true;}}
var container;var alpha_bg;function display_form_thank_you(message){var size={'width':'300px','height':'300px'};name='thnky';alpha_bg=new Element('div',{id:'alpha_bg',style:'position:absolute;top:0px;left:0px;background-color:#000;filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;display:none;width:100%;height:100%'});container=new Element('div',{id:name+'_cont',style:'position:absolute;top:0px;left:0px;background-color:#fff;border:1px solid #ccc;display:none;width:300px;'});var header=new Element('div',{id:name+'_header',style:'background: #666;text-align: right;color: #fff;height: 30px;line-height: 30px;width:300px;'});var content=new Element('div',{id:name+'_content',style:'padding:10px 0px 0px 0px;width:300px;'});var opt_img_div=new Element('div',{id:name+'_img',style:''});var header_text=new Element('div',{style:'float: left;font-size: 16px;margin-left: 10px;line-height: 30px;font-weight: bold;'});var header_close=new Element('div',{style:'float: right;margin: 5px 5px 0px 0px;'});var footer=new Element('div',{id:name+'_footer',style:'text-align:right;width:280px;margin:5px 10px;line-height:16px;color:#666;'});var close_img=new Element('img',{src:'http://www.inroads.us/iopt/images/map_close.gif',title:"Close",style:'cursor: pointer;'});var inroads=new Element('img',{src:'http://www.inroads.us/iopt/images/inroads-map.gif',title:"Inroads, LLC",style:"vertical-align:top"});alpha_bg.style.height=dbody.getHeight()+'px';header_close.insert(close_img);header.insert(header_close);header.insert(header_text);header.insert(header_text);content.insert(message);footer.insert(inroads);container.insert(header);container.insert(content);dbody.insert(alpha_bg);dbody.insert(container);divDialogs.position_dialog(container);close_img.observe('click',hide_ty);container.show();alpha_bg.show();}
function hide_ty(message){alpha_bg.remove();container.remove();};var divDialogs={create_dialog:function create_dialog(type,element,div_handle,data){if($(element))
{el=$(element);divDialogs.position_dialog(el);if(type=="draggable")
{new Draggable(el,{handle:div_handle})}}},position_dialog:function position_dialog(el){var divwidth=el.getWidth();var divheight=el.getHeight();var window_width=get_document_window_width();var width=convert_width(divwidth,window_width);var window_height=get_document_window_height();var height=convert_height(divheight,window_height);var mleft=calculate_left(width,window_width);var mtop=calculate_top(height,window_height);el.style.top=mtop+"px";el.style.left=mleft+"px";},display_dialog:function display_dialog(el){new Effect.Appear(el);},openWindow:function openWindow(path,wname,ht,wt)
{aswindow_width=get_document_window_width();aswidth=convert_width(wt,aswindow_width);aswindow_height=get_document_window_height();asheight=convert_height(ht,aswindow_height);asleft=calculate_left(aswidth,aswindow_width);astop=calculate_top(asheight,aswindow_height);if(newwindow)newwindow.close();newwindow=window.open(path,wname,"menubar=0,resizable=0,screenX="+asleft+",screenY="+astop+",left="+asleft+",top="+astop+",width="+wt+",height="+ht+"");newwindow.focus();},showDiv:function showDiv(div_name){el=$(div_name);var divwidth=el.getWidth();var divheight=el.getHeight();var window_width=get_document_window_width();var width=convert_width(divwidth,window_width);var window_height=get_document_window_height();var height=convert_height(divheight,window_height);var mleft=calculate_left(width,window_width);var mtop=calculate_top(height,window_height);el.style.top=150+"px";el.style.left=mleft+"px";new Effect.Appear(el);},hideDiv:function hideDiv(div_name)
{el=$(div_name);new Effect.Fade(el);}}