//<!--
// \include\js\mips\merch_view_item.js@@\main\16 
<!--
function adjustIFrameSize(iframeWindow){var adjHeight=0;if(ebay.oGlobals.oClient.bIE)
{adjHeight=-20;}
if(is.mac)
return false;var iframeElement=this.document.getElementById(iframeWindow.name);if(!iframeElement||typeof(iframeElement)=='undefined')
return false;if(iframeWindow.document.height){iframeElement.style.height=iframeWindow.document.height+'px';iframeElement.style.width=iframeWindow.document.width+'px';}
else if(document.all){if(iframeWindow.document.compatMode&&iframeWindow.document.compatMode!='BackCompat')
{iframeElement.style.height=iframeWindow.document.documentElement.scrollHeight+5+'px';iframeElement.style.width=iframeWindow.document.documentElement.scrollWidth+5+'px';}
else{iframeElement.style.height=iframeWindow.document.body.scrollHeight+adjHeight+5+'px';iframeElement.style.width=iframeWindow.document.body.scrollWidth+5+'px';}}}
function changeFrame()
{if(!is.mac)
{if(parent.adjustIFrameSize)parent.adjustIFrameSize(window);}}
function adjustIFrameHeight(iframeWindow)
{if(is.mac)
return false;var iframeElement=this.document.getElementById(iframeWindow.name);if(!iframeElement||typeof(iframeElement)=='undefined')
return false;if(iframeWindow.document.height)
iframeElement.style.height=iframeWindow.document.height+'px';else if(document.all)
{if(iframeWindow.document.compatMode&&iframeWindow.document.compatMode!='BackCompat')
iframeElement.style.height=iframeWindow.document.documentElement.scrollHeight+5+'px';else
iframeElement.style.height=iframeWindow.document.body.scrollHeight+5+'px';}
iframeElement.style.width="100%";}
function changeFrameHeight()
{if(!is.mac)
if(parent.adjustIFrameHeight)parent.adjustIFrameHeight(window);}
function getIframeHeight(iframeWindow){if(is.mac)
{return 0;}
if(iframeWindow.document.height){var iframeElement=this.document.getElementById(iframeWindow.name);return iframeWindow.document.height;}
else if(document.all){var iframeElement=this.document.all[iframeWindow.name];if(iframeWindow.document.compatMode&&iframeWindow.document.compatMode!='BackCompat')
{return iframeWindow.document.documentElement.scrollHeight;}
else{return iframeWindow.document.body.scrollHeight;}}}
function ssTrackIframeRequest()
{}
function submitWithParams(form_id,fields)
{var form=document.forms[form_id];if(typeof(form)=="undefined")
{form=parent.document.forms[form_id];}
if(typeof(form)!="undefined"&&typeof(fields)!="undefined")
{for(var i=0;i<fields.length;i++)
{var field=form[fields[i][0]];var value=fields[i][1];if(typeof(field)!="undefined")
{field.value=value;}}
form.submit();return true;}
return false;}
function iframeDownGrade()
{if(!(is.mac&&is.ie))
{ebayDowngradeDomain();}}
iframeDownGrade();

// \include\js\getparams.js@@\main\5 

function ReadURL(url){var params=new Array();var Inputs=unescape(url.search).split('?');var pairs=unescape(Inputs[1]).split('&');return(pairs);}
function getParams(array,variable){nameVal=array.split('=');if(nameVal[0]==variable){var VariableValue=nameVal[1];}else{var VariableValue="";}
return(VariableValue);}

// \include\js\lib\features\myebay\crossPromoPrefs.js@@\main\3 

function disableForm(state)
{if(is.ie&&is.win)
{var f=document.forms['PreferencesForm'];for(var i=0;i<f.length;i++)
{if(f[i].type=="select-one")
{toggleDisable(f[i],state);}
if(f[i].type!='radio'||f[i].type=='hidden'||f[i].name=='CheckCrossPromote')
{continue;}
toggleDisable(f[i],state);}}}
function selectCrossPromote()
{document.forms['PreferencesForm']['CheckCrossPromote'][0].checked=true;checkSelections();}
function checkPromote()
{document.forms['PreferencesForm']['ccp'].checked=true;document.forms['PreferencesForm']['CrossPromote'].checked=true;checkSelections();}
function noCheckPromote()
{document.forms['PreferencesForm']['ccp'].checked=false;document.forms['PreferencesForm']['CrossPromote'].checked=false;disableForm(true);}
function checkSelections()
{disableForm(false);if(is.ie&&is.win&&typeof(document.forms['PreferencesForm']['UpSellFormatDisplay'])!="undefined")
{if(document.forms['PreferencesForm']['UpSellFormatDisplay'][2].checked)
{disableOption('UpSellGalleryDisplay',1,true,2);}
if(document.forms['PreferencesForm']['UpSellGalleryDisplay'][1].checked)
{disableOption('UpSellFormatDisplay',2,true,3);}
if(document.forms['PreferencesForm']['UpSellSort'][5].checked)
{disableOption('UpSellGalleryDisplay',1,true,2);disableOption('UpSellFormatDisplay',2,true,3);}
if(document.forms['PreferencesForm']['CrossSellFormatDisplay'][2].checked)
{disableOption('CrossSellGalleryDisplay',1,true,2);}
if(document.forms['PreferencesForm']['CrossSellGalleryDisplay'][1].checked)
{disableOption('CrossSellFormatDisplay',2,true,3);}
if(document.forms['PreferencesForm']['CrossSellSort'][5].checked)
{disableOption('CrossSellGalleryDisplay',1,true,2);disableOption('CrossSellFormatDisplay',2,true,3);}}}
function disableOption(group,num,state,defaultOption)
{if(is.ie&&is.win&&typeof(document.forms['PreferencesForm']['UpSellFormatDisplay'])!="undefined")
{var o=document.forms['PreferencesForm'][group][num];if(state==true&&o.checked)
{document.forms['PreferencesForm'][group][defaultOption].checked=true;}
toggleDisable(document.forms['PreferencesForm'][group][num],state);}}
function toggleDisable(theInput,state)
{if(is.ie&&is.win)
{theInput.disabled=state;}}
//-->
