Hi -- this is probably going to be a tough question, but I've got a custom google search box redirecting search results to an existing webpage on my site. You can see the search box in the upper right hand corner of this page,
http://www.chryslerbrooklyn.com/. If you type in "mold," you'll see the results are directed to a pre-existing php page (gmisearch.php), and the search results are held in an iframe generated by javascript.
This is the code I've put on the php page (gmisearch.php) to display the search results:
<script type="text/javascript">
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchDomain = "
www.google.com";
var googleSearchPath = "/cse";
</script>
<script type="text/javascript">
(function(){var e=null,b=window,o=b.google
SearchResi
zeIframe||
b.googleSe
archPath&&
b.googleSe
archPath==
"/cse"&&ty
peof b.googleSearchResizeIframe
=="undefin
ed",l,k,h;
function p(a,c,d,i){var f={};a=a.split(d);for(d=0;
d<a.length
;d++){var g=a[d],j=g.indexOf(c);if(j
>0){var m=g.substring(0,j);m=i?m.t
oUpperCase
():m.toLow
erCase();g
=g.substri
ng(j+1,g.l
ength);f[m
]=g}}retur
n f}function r(){var a=document.location.search
;if(a.leng
th<1)retur
n"";a=a.su
bstring(1,
a.length);
a=p(a,"=",
"&",false)
;if(b.goog
leSearchQu
eryString!
=
"q"&&a[b.googleSearchQuery
String]){a
.q=a[b.goo
gleSearchQ
ueryString
];delete a[b.googleSearchQueryStrin
g]}if(a.co
f){var c=p(decodeURIComponent(a.c
of),":",";
",true);if
(c=c.FORID
)l=parseIn
t(c,10)}if
(c=documen
t.getEleme
ntById(b.g
oogleSearc
hFormName)
){if(c.q&&
a.q&&(!a.i
e||a.ie.to
LowerCase(
)=="utf-8"
))c.q.valu
e=decodeUR
IComponent
(a.q.repla
ce(/\+/g,"
"));if(c.sitesearch)for(va
r d=0;d<c.sitesearch.length;
d++)c.site
search[d].
checked=a.
sitesearch
==e&&c.sit
esearch[d]
.value==""
?true:c.si
tesearch[d
].value==a
.sitesearc
h?
true:false}c="";for(var i in a)c+="&"+i+"="+a[i];return
c.substring(1,c.length)}fu
nction n(a,c){return c?"&"+a+"="+encodeURICompo
nent(c):""
}function q(a,c){return a?Math.max(a,c):c}function
s(){var a="
http://";a+=b.googleSea
rchDomain?
b.googleSe
archDomain
:"
www.google.com";a+
=b.googleS
earchPath?
b.googleSe
archPath:"
/custom";a
+="?";if(b
.googleSea
rchQuerySt
ring)b.goo
gleSearchQ
ueryString
=b.googleS
earchQuery
String.toL
owerCase()
;a+=r();a+
=n("ad","w
"+k);a+=n(
"num",h);a
+=n("adtes
t",b.googl
eAdtest);i
f(o){var c=
b.location.href,d=c.indexO
f("#");if(
d!=-1)c=c.
substring(
0,d);a+=n(
"rurl",c)}
return a}function t(){(k=b.googleSearchNumAd
s)||(k=9);
h=(h=b.goo
gleNumSear
chResults)
?Math.min(
h,20):10;v
ar a={};a[9]=795;a[10]=395;a[
11]=500;va
r c={};c[9]=300+90*h;c[10]=3
00+50*Math
.min(k,4)+
90*h;c[11]
=300+50*k+
90*h;var d=s();if(!b.googleSearchFr
ameborder)
b.googleSe
archFrameb
order="0";
var i=document.getElementById(
b.googleSe
archIframe
Name);if(i
&&a[l]){a=
q(b.google
SearchFram
eWidth,a[l
]);c=q(b.g
oogleSearc
hFrameHeig
ht,c[l]);
var f=document.createElement("
iframe");d
={name:"go
ogleSearch
Frame",src
:d,frameBo
rder:b.goo
gleSearchF
rameborder
,width:a,h
eight:c,ma
rginWidth:
"0",margin
Height:"0"
,hspace:"0
",vspace:"
0",allowTr
ansparency
:"true",sc
rolling:"n
o"};for(va
r g in d)f.setAttribute(g,d[g]);i
.appendChi
ld(f);f.at
tachEvent?
f.attachEv
ent("onloa
d",functio
n(){window
.scrollTo(
0,0)}):f.a
ddEventLis
tener("loa
d",functio
n(){window
.scrollTo(
0,0)},fals
e);o&&b.se
tInterval(
function()
{if(b.loca
tion.hash&
&b.locatio
n.hash!="#
"){var j=b.location.hash.substrin
g(1)+
"px";if(f.height!=j&&j!="0
px")f.heig
ht=j}},10)
}b.googleS
earchIfram
eName=e;b.
googleSear
chFormName
=e;b.googl
eSearchRes
izeIframe=
e;b.google
SearchQuer
yString=e;
b.googleSe
archDomain
=e;b.googl
eSearchPat
h=e;b.goog
leSearchFr
ameborder=
e;b.google
SearchFram
eWidth=e;b
.googleSea
rchFrameHe
ight=e;b.g
oogleSearc
hNumAds=e;
b.googleNu
mSearchRes
ults=e;b.g
oogleAdtes
t=e}t()})(
);
</script>
My question: how do I modify the javascript to reposition the iframe to the RIGHT side of the page. Currently it is displaying search results on the left side.