1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Advanced Image Search - Digital Inspiration</title>
<!--Written by Amit Agarwal, http://www.labnol.org, September 16, 2008 -->
<style type="text/css">
<!--
a {
font-size: 12px;
color: #f0e;
}
a:visited {
color: #f0e;
}
a:hover {
color: #f0e;
}
a:active {
color: #f0e;
}
-->
</style></head>
<body>
<div align="center">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="dumpsearch.js" type="text/javascript"></script>
<script type="text/javascript" src="all.js"></script>
<script type="text/javascript" src="cufon-yui.js"></script>
<script type="text/javascript" src="futura.js"></script>
<style type="text/css">
body {
}
#rapper{margin-left:auto;
margin-right:auto;
text-align:left;
width:700px;
}
#container {
text-align: left;
font-family: sans-serif;
color: #4E4848;
margin-left: auto;
margin-right: auto;
width: 1200px;
}
#description {display:none;width:790px;}
#description div, .post, .result {margin:0 0 40px 270px;width:520px;}
#description p > p,#description p {margin:0;}
#description img {float:left;margin:0 12px 32px 0;}
table.search{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;color:#333}.gsc-trailing-more-results,.gsc-resultsHeader,.gsc-search-box{display:none}.gsc-results{padding-left:20px}#searchControl .gsc-control{width:800px;margin:10px;padding:10px}select, label{font:bold 11px Arial,Helvetica,sans-serif;color:#003;text-transform:uppercase;margin-right:5px}input#q{font:bold 13px Arial,Helvetica,sans-serif;color:#F00;height:2em;padding:3px;border-top:2px solid #999;border-right:2px solid #999;border-bottom:1px solid #999;border-left:1px solid #999;}
#logo{padding-left:20;}
</style>
</div>
<form onSubmit="searchImages(); return false;" > <div id="rapper">
<div align="center">
<table class="search" width="600" border="0" cellpadding="5" cellspacing="0">
<tr>
<td colspan="2"><p><img src="dumpsearch.gif" width="425" height="192">
</p>
<input name="q" type="text" id="q" onChange="searchImages();" size="50%">
<label>
<input type="submit" name="submit" id="submit" value="Search Images">
</label>
</p></td>
</tr> <tr>
<td colspan="2"><div id="searchControl">Loading...</div></td>
</tr>
</table> <table class="search" width="600" border="0" cellpadding="5" cellspacing="0">
</div>
<p align="left"><a href="#" id="about">options</a></table>
</div>
</div>
<div id="description">
<div align="left"><a href="#" class="closeinfo"></a>
</p>
</div>
<div>
<table class="search" width="600" border="0" cellpadding="5" cellspacing="0">
<tr>
<td colspan="2">
<label>where:
<select name="site" id="site" onChange="searchImages();"> <option value="flickr.com" selected>flickr</option> <option value="zooomr.com">zooomr</option> <option value="photobucket.com">photobucket</option> <option value="myspace.com">myspace</option> <option value="wordpress.com">wordpress</option> <option value="blogger.com">blogger</option> <option value="typepad.com">typepad</option>
<option value="webshots.com">webshots</option>
<option value="gov">US Government</option>
<option value="deviantart.com">deviant art</option>
<option value="corbis.com">corbis</option>
<option value="0" selected>default</option> </select> </label><label>
<input name="showFaces" type="checkbox" onClick="searchImages();">
Only Faces</label> · <label>Safe Search</label>
<input type="radio" name="safeSearch" id="safeSearch2" value="off" onClick="searchImages();"checked>
Off
<input name="safeSearch" type="radio" id="safeSearch2" value="moderate" onClick="searchImages();" >
Moderate
<input type="radio" name="safeSearch" id="safeSearch2" value="strict" onClick="searchImages();">
On </td>
</tr>
<tr>
<td colspan="2">
Refine your image search results..</td>
</tr>
<tr>
<td colspan="2"><label>File Type</label>
<input type="radio" name="type" value="jpg" onClick="searchImages();">
JPG
<input name="type" type="radio" value="png" onClick="searchImages();">
PNG
<input name="type" type="radio" value="bmp" onClick="searchImages();">
BMP
<input type="radio" name="type" value="gif" onClick="searchImages();">
GIF
<input type="radio" name="type" value="0" checked onClick="searchImages();">
Any</td>
</tr>
<tr>
<td colspan="2"><label>Image Size</label>
<input type="radio" name="size" value="small" onClick="searchImages();">
Small
<input name="size" type="radio" value="medium" onClick="searchImages();">
Medium
<input type="radio" name="size" value="large" onClick="searchImages();">
Large
<input type="radio" name="size" value="xlarge" onClick="searchImages();">
Extra Large
<input type="radio" name="size" value="0" checked onClick="searchImages();">
All Sizes</td>
</tr>
<tr>
<td colspan="2"><label>Image Color</label>
<input type="radio" name="color" value="bw" onClick="searchImages();">
Black & White
<input name="color" type="radio" value="gray" onClick="searchImages();">
Gray
<input type="radio" name="color" value="color" onClick="searchImages();">
Colored
<input type="radio" name="color" value="0" checked onClick="searchImages();">
No Preference</td>
</tr>
</table>
</div>
</div>
</div>
</form>
<div align="center">
</div>
<script type="text/javascript">
google.load('search', '1');
google.setOnLoadCallback(searchImages, true);
function searchImages() {
var control = new google.search.SearchControl();
control.setResultSetSize(google.search.Search.LARGE_RESULTSET);
control.setNoResultsString("Sorry but no images match your search criteria. Please modify your search query and try again.");
control.setLinkTarget(google.search.Search.LINK_TARGET_BLANK);
var options = new google.search.SearcherOptions();
options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
var searcher = new google.search.ImageSearch();
for (var i = 0; i < document.forms[0].safeSearch.length; i++) {
if (document.forms[0].safeSearch[i].checked) {
if (document.forms[0].safeSearch[i].value == "off")
searcher.setRestriction(GSearch.RESTRICT_SAFESEARCH, google.search.Search.SAFESEARCH_OFF);
else if (document.forms[0].safeSearch[i].value == "moderate")
searcher.setRestriction(GSearch.RESTRICT_SAFESEARCH, google.search.Search.SAFESEARCH_MODERATE);
else if (document.forms[0].safeSearch[i].value == "strict")
searcher.setRestriction(GSearch.RESTRICT_SAFESEARCH, google.search.Search.SAFESEARCH_STRICT);
else
searcher.setRestriction(GSearch.RESTRICT_SAFESEARCH, null);
break;
}
}
for (var i = 0; i < document.forms[0].size.length; i++) {
if (document.forms[0].size[i].checked) {
if (document.forms[0].size[i].value == "small")
searcher.setRestriction(GimageSearch.RESTRICT_IMAGESIZE, google.search.ImageSearch.IMAGESIZE_SMALL);
else if (document.forms[0].size[i].value == "medium")
searcher.setRestriction(GimageSearch.RESTRICT_IMAGESIZE, google.search.ImageSearch.IMAGESIZE_MEDIUM);
else if (document.forms[0].size[i].value == "large")
searcher.setRestriction(GimageSearch.RESTRICT_IMAGESIZE, google.search.ImageSearch.IMAGESIZE_LARGE);
else if (document.forms[0].size[i].value == "xlarge")
searcher.setRestriction(GimageSearch.RESTRICT_IMAGESIZE, google.search.ImageSearch.IMAGESIZE_EXTRA_LARGE);
else
searcher.setRestriction(GimageSearch.RESTRICT_IMAGESIZE, null);
break;
}
}
for (var i = 0; i < document.forms[0].type.length; i++) {
if (document.forms[0].type[i].checked) {
if (document.forms[0].type[i].value == "bmp")
searcher.setRestriction(GimageSearch.RESTRICT_FILETYPE, google.search.ImageSearch.FILETYPE_BMP);
else if (document.forms[0].type[i].value == "jpg")
searcher.setRestriction(GimageSearch.RESTRICT_FILETYPE, google.search.ImageSearch.FILETYPE_JPG);
else if (document.forms[0].type[i].value == "png")
searcher.setRestriction(GimageSearch.RESTRICT_FILETYPE, google.search.ImageSearch.FILETYPE_PNG);
else if (document.forms[0].type[i].value == "gif")
searcher.setRestriction(GimageSearch.RESTRICT_FILETYPE, google.search.ImageSearch.FILETYPE_GIF);
else
searcher.setRestriction(GimageSearch.RESTRICT_FILETYPE, null);
break;
}
}
for (var i = 0; i < document.forms[0].color.length; i++) {
if (document.forms[0].color[i].checked) {
if (document.forms[0].color[i].value == "bw")
searcher.setRestriction(GimageSearch.RESTRICT_COLORIZATION, google.search.ImageSearch.COLORIZATION_BLACK_AND_WHITE );
else if (document.forms[0].color[i].value == "gray")
searcher.setRestriction(GimageSearch.RESTRICT_COLORIZATION, google.search.ImageSearch.COLORIZATION_GRAYSCALE);
else if (document.forms[0].color[i].value == "color")
searcher.setRestriction(GimageSearch.RESTRICT_COLORIZATION, google.search.ImageSearch.COLORIZATION_COLOR);
else
searcher.setRestriction(GimageSearch.RESTRICT_COLORIZATION, null);
break;
}
}
var list = document.forms[0].site;
if (list.options[list.selectedIndex].value == 0)
searcher.setSiteRestriction(null);
else
searcher.setSiteRestriction(list.options[list.selectedIndex].value);
for (var i = 0; i < document.forms[0].site.length; i++) {
if (document.forms[0].site[i].checked) {
if (document.forms[0].site[i].value == 0)
searcher.setSiteRestriction(null);
else
searcher.setSiteRestriction(document.forms[0].site[i].value);
break;
}
}
if (document.forms[0].showFaces.checked)
searcher.setRestriction(GimageSearch.RESTRICT_IMAGETYPE, GimageSearch.IMAGETYPE_FACES);
else
searcher.setRestriction(GimageSearch.RESTRICT_IMAGETYPE);
control.addSearcher(searcher, options);
control.draw(document.getElementById("searchControl"));
control.execute(document.getElementById('q').value);
return false;
}
</script>
</div>
</body>
</html>
|